diff --git a/.editorconfig b/.editorconfig
index c0ea55f4c8..67c47000d3 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -191,6 +191,8 @@ csharp_style_prefer_index_operator = false:silent
csharp_style_prefer_range_operator = false:silent
csharp_style_prefer_switch_expression = false:none
+csharp_style_namespace_declarations = block_scoped:warning
+
[*.{yaml,yml}]
insert_final_newline = true
indent_style = space
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
index 8be6479043..b85862270b 100644
--- a/.git-blame-ignore-revs
+++ b/.git-blame-ignore-revs
@@ -1,2 +1,8 @@
# Normalize all the line endings
32a74f95a5c80a0ed18e693f13a47522099df5c3
+# Partial everything
+7bc8908ca9c026fed1d831eb6e58df7624a8d614
+# Add a few more missing partial specs
+212d78865a6b5f091173a347bad5686834d1d5fe
+# Add partial specs in mobile projects too
+00c11b2b4e389e48f3995d63484a6bc66a7afbdb
diff --git a/.github/ISSUE_TEMPLATE/bug-issue.yml b/.github/ISSUE_TEMPLATE/bug-issue.yml
index 91ca622f55..ff6d869e72 100644
--- a/.github/ISSUE_TEMPLATE/bug-issue.yml
+++ b/.github/ISSUE_TEMPLATE/bug-issue.yml
@@ -58,7 +58,8 @@ body:
The default places to find the logs on desktop platforms are as follows:
- `%AppData%/osu/logs` *on Windows*
- - `~/.local/share/osu/logs` *on Linux & macOS*
+ - `~/.local/share/osu/logs` *on Linux*
+ - `~/Library/Application Support/osu/logs` *on macOS*
If you have selected a custom location for the game files, you can find the `logs` folder there.
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 56b3ebe87b..a8167ec4db 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -13,17 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
# FIXME: Tools won't run in .NET 6.0 unless you install 3.1.x LTS side by side.
# https://itnext.io/how-to-support-multiple-net-sdks-in-github-actions-workflows-b988daa884e
- name: Install .NET 3.1.x LTS
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v3
with:
dotnet-version: "3.1.x"
- name: Install .NET 6.0.x
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
@@ -31,7 +31,7 @@ jobs:
run: dotnet tool restore
- name: Restore Packages
- run: dotnet restore
+ run: dotnet restore osu.Desktop.slnf
- name: Restore inspectcode cache
uses: actions/cache@v3
@@ -77,10 +77,10 @@ jobs:
timeout-minutes: 60
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Install .NET 6.0.x
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
@@ -94,7 +94,7 @@ jobs:
# Attempt to upload results even if test fails.
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#always
- name: Upload Test Results
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: osu-test-results-${{matrix.os.prettyname}}-${{matrix.threadingMode}}
@@ -106,34 +106,46 @@ jobs:
timeout-minutes: 60
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Install .NET 6.0.x
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
- - name: Setup MSBuild
- uses: microsoft/setup-msbuild@v1
+ - name: Install .NET workloads
+ run: dotnet workload install maui-android
- - name: Build
- run: msbuild osu.Android/osu.Android.csproj /restore /p:Configuration=Debug
+ - name: Compile
+ run: dotnet build -c Debug osu.Android.slnf
build-only-ios:
name: Build only (iOS)
- runs-on: macos-latest
+ # `macos-13` is required, because Xcode 14.3 is required (see below).
+ # TODO: can be changed to `macos-latest` once `macos-13` becomes latest (currently in beta)
+ runs-on: macos-13
timeout-minutes: 60
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
+
+ # newest Microsoft.iOS.Sdk versions require Xcode 14.3.
+ # 14.3 is currently not the default Xcode version (https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#xcode),
+ # so set it manually.
+ # TODO: remove when 14.3 becomes the default Xcode version.
+ - name: Set Xcode version
+ shell: bash
+ run: |
+ sudo xcode-select -s "/Applications/Xcode_14.3.app"
+ echo "MD_APPLE_SDK_ROOT=/Applications/Xcode_14.3.app" >> $GITHUB_ENV
- name: Install .NET 6.0.x
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
- # Contrary to seemingly any other msbuild, msbuild running on macOS/Mono
- # cannot accept .sln(f) files as arguments.
- # Build just the main game for now.
+ - name: Install .NET Workloads
+ run: dotnet workload install maui-ios
+
- name: Build
- run: msbuild osu.iOS/osu.iOS.csproj /restore /p:Configuration=Debug
+ run: dotnet build -c Debug osu.iOS
diff --git a/.github/workflows/diffcalc.yml b/.github/workflows/diffcalc.yml
index 9e11ab6663..2c6ec17e18 100644
--- a/.github/workflows/diffcalc.yml
+++ b/.github/workflows/diffcalc.yml
@@ -48,8 +48,8 @@ jobs:
CONTINUE="no"
fi
- echo "::set-output name=continue::${CONTINUE}"
- echo "::set-output name=matrix::${MATRIX_JSON}"
+ echo "continue=${CONTINUE}" >> $GITHUB_OUTPUT
+ echo "matrix=${MATRIX_JSON}" >> $GITHUB_OUTPUT
diffcalc:
name: Run
runs-on: self-hosted
@@ -80,34 +80,34 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
- echo "::set-output name=branchname::$(curl -H "Authorization: token ${GITHUB_TOKEN}" ${{ github.event.issue.pull_request.url }} | jq '.head.ref' | sed 's/\"//g')"
- echo "::set-output name=repo::$(curl -H "Authorization: token ${GITHUB_TOKEN}" ${{ github.event.issue.pull_request.url }} | jq '.head.repo.full_name' | sed 's/\"//g')"
+ echo "branchname=$(curl -H "Authorization: token ${GITHUB_TOKEN}" ${{ github.event.issue.pull_request.url }} | jq '.head.ref' | sed 's/\"//g')" >> $GITHUB_OUTPUT
+ echo "repo=$(curl -H "Authorization: token ${GITHUB_TOKEN}" ${{ github.event.issue.pull_request.url }} | jq '.head.repo.full_name' | sed 's/\"//g')" >> $GITHUB_OUTPUT
# Checkout osu
- name: Checkout osu (master)
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
path: 'master/osu'
- name: Checkout osu (pr)
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
path: 'pr/osu'
repository: ${{ steps.upstreambranch.outputs.repo }}
ref: ${{ steps.upstreambranch.outputs.branchname }}
- name: Checkout osu-difficulty-calculator (master)
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: ppy/osu-difficulty-calculator
path: 'master/osu-difficulty-calculator'
- name: Checkout osu-difficulty-calculator (pr)
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: ppy/osu-difficulty-calculator
path: 'pr/osu-difficulty-calculator'
- name: Install .NET 5.0.x
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v3
with:
dotnet-version: "5.0.x"
diff --git a/.github/workflows/report-nunit.yml b/.github/workflows/report-nunit.yml
index bfc9620174..99e39f6f56 100644
--- a/.github/workflows/report-nunit.yml
+++ b/.github/workflows/report-nunit.yml
@@ -28,7 +28,7 @@ jobs:
timeout-minutes: 5
steps:
- name: Annotate CI run with test results
- uses: dorny/test-reporter@v1.4.2
+ uses: dorny/test-reporter@v1.6.0
with:
artifact: osu-test-results-${{matrix.os.prettyname}}-${{matrix.threadingMode}}
name: Test Results (${{matrix.os.prettyname}}, ${{matrix.threadingMode}})
diff --git a/.github/workflows/sentry-release.yml b/.github/workflows/sentry-release.yml
index cce3f23e5f..ff4165c414 100644
--- a/.github/workflows/sentry-release.yml
+++ b/.github/workflows/sentry-release.yml
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
fetch-depth: 0
diff --git a/.github/workflows/update-web-mod-definitions.yml b/.github/workflows/update-web-mod-definitions.yml
new file mode 100644
index 0000000000..32d3d37ffe
--- /dev/null
+++ b/.github/workflows/update-web-mod-definitions.yml
@@ -0,0 +1,53 @@
+name: Update osu-web mod definitions
+on:
+ push:
+ tags:
+ - '*'
+
+permissions:
+ contents: read # to fetch code (actions/checkout)
+
+jobs:
+ update-mod-definitions:
+ name: Update osu-web mod definitions
+ runs-on: ubuntu-latest
+ steps:
+ - name: Install .NET 6.0.x
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: "6.0.x"
+
+ - name: Checkout ppy/osu
+ uses: actions/checkout@v3
+ with:
+ path: osu
+
+ - name: Checkout ppy/osu-tools
+ uses: actions/checkout@v3
+ with:
+ repository: ppy/osu-tools
+ path: osu-tools
+
+ - name: Checkout ppy/osu-web
+ uses: actions/checkout@v3
+ with:
+ repository: ppy/osu-web
+ path: osu-web
+
+ - name: Setup local game checkout for tools
+ run: ./UseLocalOsu.sh
+ working-directory: ./osu-tools
+
+ - name: Regenerate mod definitions
+ run: dotnet run --project PerformanceCalculator -- mods > ../osu-web/database/mods.json
+ working-directory: ./osu-tools
+
+ - name: Create pull request with changes
+ uses: peter-evans/create-pull-request@v5
+ with:
+ title: Update mod definitions
+ body: "This PR has been auto-generated to update the mod definitions to match ppy/osu@${{ github.ref_name }}."
+ branch: update-mod-definitions
+ commit-message: Update mod definitions
+ path: osu-web
+ token: ${{ secrets.OSU_WEB_PULL_REQUEST_PAT }}
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ae2bdd2e82..9f7d88f5c7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,136 +2,87 @@
Thank you for showing interest in the development of osu!. We aim to provide a good collaborating environment for everyone involved, and as such have decided to list some of the most important things to keep in mind in the process. The guidelines below have been chosen based on past experience.
-These are not "official rules" *per se*, but following them will help everyone deal with things in the most efficient manner.
-
## Table of contents
-1. [I would like to submit an issue!](#i-would-like-to-submit-an-issue)
-2. [I would like to submit a pull request!](#i-would-like-to-submit-a-pull-request)
+1. [Reporting bugs](#reporting-bugs)
+2. [Providing general feedback](#providing-general-feedback)
+3. [Issue or discussion?](#issue-or-discussion)
+4. [Submitting pull requests](#submitting-pull-requests)
+5. [Resources](#resources)
-## I would like to submit an issue!
+## Reporting bugs
-Issues, bug reports and feature suggestions are welcomed, though please keep in mind that at any point in time, hundreds of issues are open, which vary in severity and the amount of time needed to address them. As such it's not uncommon for issues to remain unresolved for a long time or even closed outright if they are deemed not important enough to fix in the foreseeable future. Issues that are required to "go live" or otherwise achieve parity with stable are prioritised the most.
+A **bug** is a situation in which there is something clearly *and objectively* wrong with the game. Examples of applicable bug reports are:
-* **Before submitting an issue, try searching existing issues first.**
+- The game crashes to desktop when I start a beatmap
+- Friends appear twice in the friend listing
+- The game slows down a lot when I play this specific map
+- A piece of text is overlapping another piece of text on the screen
- For housekeeping purposes, we close issues that overlap with or duplicate other pre-existing issues - you can help us not to have to do that by searching existing issues yourself first. The issue search box, as well as the issue tag system, are tools you can use to check if an issue has been reported before.
+To track bug reports, we primarily use GitHub **issues**. When opening an issue, please keep in mind the following:
-* **When submitting a bug report, please try to include as much detail as possible.**
+- Before opening the issue, please search for any similar existing issues using the text search bar and the issue labels. This includes both open and closed issues (we may have already fixed something, but the fix hasn't yet been released).
+- When opening the issue, please fill out as much of the issue template as you can. In particular, please make sure to include logs and screenshots as much as possible. The instructions on how to find the log files are included in the issue template.
+- We may ask you for follow-up information to reproduce or debug the problem. Please look out for this and provide follow-up info if we request it.
- Bugs are not equal - some of them will be reproducible every time on pretty much all hardware, while others will be hard to track down due to being specific to particular hardware or even somewhat random in nature. As such, providing as much detail as possible when reporting a bug is hugely appreciated. A good starting set of information consists of:
+If we cannot reproduce the issue, it is deemed low priority, or it is deemed to be specific to your setup in some way, the issue may be downgraded to a discussion. This will be done by a maintainer for you.
- * the in-game logs, which are located at:
- * `%AppData%/osu/logs` (on Windows),
- * `~/.local/share/osu/logs` (on Linux and macOS),
- * `Android/data/sh.ppy.osulazer/files/logs` (on Android),
- * on iOS they can be obtained by connecting your device to your desktop and [copying the `logs` directory from the app's own document storage using iTunes](https://support.apple.com/en-us/HT201301#copy-to-computer),
- * your system specifications (including the operating system and platform you are playing on),
- * a reproduction scenario (list of steps you have performed leading up to the occurrence of the bug),
- * a video or picture of the bug, if at all possible.
+## Providing general feedback
-* **Provide more information when asked to do so.**
+If you wish to:
- Sometimes when a bug is more elusive or complicated, none of the information listed above will pinpoint a concrete cause of the problem. In this case we will most likely ask you for additional info, such as a Windows Event Log dump or a copy of your local osu! database (`client.db`). Providing that information is beneficial to both parties - we can track down the problem better, and hopefully fix it for you at some point once we know where it is!
+- provide *subjective* feedback on the game (about how the UI looks, about how the default skin works, about game mechanics, about how the PP and scoring systems work, etc.),
+- suggest a new feature to be added to the game,
+- report a non-specific problem with the game that you think may be connected to your hardware or operating system specifically,
-* **When submitting a feature proposal, please describe it in the most understandable way you can.**
+then it is generally best to start with a **discussion** first. Discussions are a good avenue to group subjective feedback on a single topic, or gauge interest in a particular feature request.
- Communicating your idea for a feature can often be hard, and we would like to avoid any misunderstandings. As such, please try to explain your idea in a short, but understandable manner - it's best to avoid jargon or terms and references that could be considered obscure. A mock-up picture (doesn't have to be good!) of the feature can also go a long way in explaining.
+When opening a discussion, please keep in mind the following:
-* **Refrain from posting "+1" comments.**
+- Use the search function to see if your idea has been proposed before, or if there is already a thread about a particular issue you wish to raise.
+- If proposing a feature, please try to explain the feature in as much detail as possible.
+- If you're reporting a non-specific problem, please provide applicable logs, screenshots, or video that illustrate the issue.
- If an issue has already been created, saying that you also experience it without providing any additional details doesn't really help us in any way. To express support for a proposal or indicate that you are also affected by a particular bug, you can use comment reactions instead.
+If a discussion gathers enough traction, then it may be converted into an issue. This will be done by a maintainer for you.
-* **Refrain from asking if an issue has been resolved yet.**
+## Issue or discussion?
- As mentioned above, the issue tracker has hundreds of issues open at any given time. Currently the game is being worked on by two members of the core team, and a handful of outside contributors who offer their free time to help out. As such, it can happen that an issue gets placed on the backburner due to being less important; generally posting a comment demanding its resolution some months or years after it is reported is not very likely to increase its priority.
+We realise that the line between an issue and a discussion may be fuzzy, so while we ask you to use your best judgement based on the description above, please don't think about it too hard either. Feedback in a slightly wrong place is better than no feedback at all.
-* **Avoid long discussions about non-development topics.**
+When in doubt, it's probably best to start with a discussion first. We will escalate to issues as needed.
- GitHub is mostly a developer space, and as such isn't really fit for lengthened discussions about gameplay mechanics (which might not even be in any way confirmed for the final release) and similar non-technical matters. Such matters are probably best addressed at the osu! forums.
+## Submitting pull requests
-## I would like to submit a pull request!
+While pull requests from unaffiliated contributors are welcome, please note that due to significant community interest and limited review throughput, the core team's primary focus is on the issues which are currently [on the roadmap](https://github.com/orgs/ppy/projects/7/views/6). Reviewing PRs that fall outside of the scope of the roadmap is done on a best-effort basis, so please be aware that it may take a while before a core maintainer gets around to review your change.
-We also welcome pull requests from unaffiliated contributors. The [issue tracker](https://github.com/ppy/osu/issues) should provide plenty of issues that you can work on; we also mark issues that we think would be good for newcomers with the [`good-first-issue`](https://github.com/ppy/osu/issues?q=is%3Aissue+is%3Aopen+label%3Agood-first-issue) label.
+The [issue tracker](https://github.com/ppy/osu/issues) should provide plenty of issues to start with. We also have a [`good-first-issue`](https://github.com/ppy/osu/issues?q=is%3Aissue+is%3Aopen+label%3Agood-first-issue) label, although from experience it is not used very often, as it is relatively rare that we can spot an issue that will definitively be a good first issue for a new contributor regardless of their programming experience.
-However, do keep in mind that the core team is committed to bringing osu!(lazer) up to par with osu!(stable) first and foremost, so depending on what your contribution concerns, it might not be merged and released right away. Our approach to managing issues and their priorities is described [in the wiki](https://github.com/ppy/osu/wiki/Project-management).
+In the case of simple issues, a direct PR is okay. However, if you decide to work on an existing issue which doesn't seem trivial, **please ask us first**. This way we can try to estimate if it is a good fit for you and provide the correct direction on how to address it. In addition, note that while we do not rule out external contributors from working on roadmapped issues, we will generally prefer to handle them ourselves unless they're not very time sensitive.
-Here are some key things to note before jumping in:
+If you'd like to propose a subjective change to one of the visual aspects of the game, or there is a bigger task you'd like to work on, but there is no corresponding issue or discussion thread yet for it, **please open a discussion or issue first** to avoid wasted effort. This in particular applies if you want to work on [one of the available designs from the osu! public Figma library](https://www.figma.com/file/6m10GiGEncVFWmgOoSyakH/osu!-Figma-Library).
-* **Make sure you are comfortable with C\# and your development environment.**
+Aside from the above, below is a brief checklist of things to watch out when you're preparing your code changes:
- While we are accepting of all kinds of contributions, we also have a certain quality standard we'd like to uphold and limited time to review your code. Therefore, we would like to avoid providing entry-level advice, and as such if you're not very familiar with C\# as a programming language, we'd recommend that you start off with a few personal projects to get acquainted with the language's syntax, toolchain and principles of object-oriented programming first.
+- Make sure you're comfortable with the principles of object-oriented programming, the syntax of C\# and your development environment.
+- Make sure you are familiar with [git](https://git-scm.com/) and [the pull request workflow](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests).
+- Please do not make code changes via the GitHub web interface.
+- Please add tests for your changes. We expect most new features and bugfixes to have test coverage, unless the effort of adding them is prohibitive. The visual testing methodology we use is described in more detail [here](https://github.com/ppy/osu-framework/wiki/Development-and-Testing).
+- Please run tests and code style analysis (via `InspectCode.{ps1,sh}` scripts in the root of this repository) before opening the PR. This is particularly important if you're a first-time contributor, as CI will not run for your PR until we allow it to do so.
- In addition, please take the time to take a look at and get acquainted with the [development and testing](https://github.com/ppy/osu-framework/wiki/Development-and-Testing) procedure we have set up.
+After you're done with your changes and you wish to open the PR, please observe the following recommendations:
-* **Make sure you are familiar with git and the pull request workflow.**
+- Please submit the pull request from a [topic branch](https://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows#_topic_branch) (not `master`), and keep the *Allow edits from maintainers* check box selected, so that we can push fixes to your PR if necessary.
+- Please avoid pushing untested or incomplete code.
+- Please do not force-push or rebase unless we ask you to.
+- Please do not merge `master` continually if there are no conflicts to resolve. We will do this for you when the change is ready for merge.
- [git](https://git-scm.com/) is a distributed version control system that might not be very intuitive at the beginning if you're not familiar with version control. In particular, projects using git have a particular workflow for submitting code changes, which is called the pull request workflow.
+We are highly committed to quality when it comes to the osu! project. This means that contributions from less experienced community members can take multiple rounds of review to get to a mergeable state. We try our utmost best to never conflate a person with the code they authored, and to keep the discussion focused on the code at all times. Please consider our comments and requests a learning experience.
- To make things run more smoothly, we recommend that you look up some online resources to familiarise yourself with the git vocabulary and commands, and practice working with forks and submitting pull requests at your own pace. A high-level overview of the process can be found in [this article by GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests).
+If you're uncertain about some part of the codebase or some inner workings of the game and framework, please reach out either by leaving a comment in the relevant issue, discussion, or PR thread, or by posting a message in the [development Discord server](https://discord.gg/ppy). We will try to help you as much as we can.
-* **Double-check designs before starting work on new functionality.**
+## Resources
- When implementing new features, keep in mind that we already have a lot of the UI designed. If you wish to work on something with the intention of having it included in the official distribution, please open an issue for discussion and we will give you what you need from a design perspective to proceed. If you want to make *changes* to the design, we recommend you open an issue with your intentions before spending too much time to ensure no effort is wasted.
-
-* **Make sure to submit pull requests off of a topic branch.**
-
- As described in the article linked in the previous point, topic branches help you parallelise your work and separate it from the main `master` branch, and additionally are easier for maintainers to work with. Working with multiple `master` branches across many remotes is difficult to keep track of, and it's easy to make a mistake and push to the wrong `master` branch by accident.
-
-* **Refrain from making changes through the GitHub web interface.**
-
- Even though GitHub provides an option to edit code or replace files in the repository using the web interface, we strongly discourage using it in most scenarios. Editing files this way is inefficient and likely to introduce whitespace or file encoding changes that make it more difficult to review the code.
-
- Code written through the web interface will also very likely be questioned outright by the reviewers, as it is likely that it has not been properly tested or that it will fail continuous integration checks. We strongly encourage using an IDE like [Visual Studio](https://visualstudio.microsoft.com/), [Visual Studio Code](https://code.visualstudio.com/) or [JetBrains Rider](https://www.jetbrains.com/rider/) instead.
-
-* **Add tests for your code whenever possible.**
-
- Automated tests are an essential part of a quality and reliable codebase. They help to make the code more maintainable by ensuring it is safe to reorganise (or refactor) the code in various ways, and also prevent regressions - bugs that resurface after having been fixed at some point in the past. If it is viable, please put in the time to add tests, so that the changes you make can last for a (hopefully) very long time.
-
-* **Run tests before opening a pull request.**
-
- Tying into the previous point, sometimes changes in one part of the codebase can result in unpredictable changes in behaviour in other pieces of the code. This is why it is best to always try to run tests before opening a PR.
-
- Continuous integration will always run the tests for you (and us), too, but it is best not to rely on it, as there might be many builds queued at any time. Running tests on your own will help you be more certain that at the point of clicking the "Create pull request" button, your changes are as ready as can be.
-
-* **Run code style analysis before opening a pull request.**
-
- As part of continuous integration, we also run code style analysis, which is supposed to make sure that your code is formatted the same way as all the pre-existing code in the repository. The reason we enforce a particular code style everywhere is to make sure the codebase is consistent in that regard - having one whitespace convention in one place and another one elsewhere causes disorganisation.
-
-* **Make sure that the pull request is complete before opening it.**
-
- Whether it's fixing a bug or implementing new functionality, it's best that you make sure that the change you want to submit as a pull request is as complete as it can be before clicking the *Create pull request* button. Having to track if a pull request is ready for review or not places additional burden on reviewers.
-
- Draft pull requests are an option, but use them sparingly and within reason. They are best suited to discuss code changes that cannot be easily described in natural language or have a potential large impact on the future direction of the project. When in doubt, don't open drafts unless a maintainer asks you to do so.
-
-* **Only push code when it's ready.**
-
- As an extension of the above, when making changes to an already-open PR, please try to only push changes you are reasonably certain of. Pushing after every commit causes the continuous integration build queue to grow in size, slowing down work and taking up time that could be spent verifying other changes.
-
-* **Make sure to keep the *Allow edits from maintainers* check box checked.**
-
- To speed up the merging process, collaborators and team members will sometimes want to push changes to your branch themselves, to make minor code style adjustments or to otherwise refactor the code without having to describe how they'd like the code to look like in painstaking detail. Having the *Allow edits from maintainers* check box checked lets them do that; without it they are forced to report issues back to you and wait for you to address them.
-
-* **Refrain from continually merging the master branch back to the PR.**
-
- Unless there are merge conflicts that need resolution, there is no need to keep merging `master` back to a branch over and over again. One of the maintainers will merge `master` themselves before merging the PR itself anyway, and continual merge commits can cause CI to get overwhelmed due to queueing up too many builds.
-
-* **Refrain from force-pushing to the PR branch.**
-
- Force-pushing should be avoided, as it can lead to accidentally overwriting a maintainer's changes or CI building wrong commits. We value all history in the project, so there is no need to squash or amend commits in most cases.
-
- The cases in which force-pushing is warranted are very rare (such as accidentally leaking sensitive info in one of the files committed, adding unrelated files, or mis-merging a dependent PR).
-
-* **Be patient when waiting for the code to be reviewed and merged.**
-
- As much as we'd like to review all contributions as fast as possible, our time is limited, as team members have to work on their own tasks in addition to reviewing code. As such, work needs to be prioritised, and it can unfortunately take weeks or months for your PR to be merged, depending on how important it is deemed to be.
-
-* **Don't mistake criticism of code for criticism of your person.**
-
- As mentioned before, we are highly committed to quality when it comes to the osu! project. This means that contributions from less experienced community members can take multiple rounds of review to get to a mergeable state. We try our utmost best to never conflate a person with the code they authored, and to keep the discussion focused on the code at all times. Please consider our comments and requests a learning experience, and don't treat it as a personal attack.
-
-* **Feel free to reach out for help.**
-
- If you're uncertain about some part of the codebase or some inner workings of the game and framework, please reach out either by leaving a comment in the relevant issue or PR thread, or by posting a message in the [development Discord server](https://discord.gg/ppy). We will try to help you as much as we can.
-
- When it comes to which form of communication is best, GitHub generally lends better to longer-form discussions, while Discord is better for snappy call-and-response answers. Use your best discretion when deciding, and try to keep a single discussion in one place instead of moving back and forth.
+- [Development roadmap](https://github.com/orgs/ppy/projects/7/views/6): What the core team is currently working on
+- [`ppy/osu-framework` wiki](https://github.com/ppy/osu-framework/wiki): Contains introductory information about osu!framework, the bespoke 2D game framework we use for the game
+- [`ppy/osu` wiki](https://github.com/ppy/osu/wiki): Contains articles about various technical aspects of the game
+- [Public Figma library](https://www.figma.com/file/6m10GiGEncVFWmgOoSyakH/osu!-Figma-Library): Contains finished and draft designs for osu!
diff --git a/CodeAnalysis/BannedSymbols.txt b/CodeAnalysis/BannedSymbols.txt
index 022da0a2ea..03fd21829d 100644
--- a/CodeAnalysis/BannedSymbols.txt
+++ b/CodeAnalysis/BannedSymbols.txt
@@ -15,6 +15,8 @@ M:Realms.CollectionExtensions.SubscribeForNotifications`1(System.Collections.Gen
M:System.Threading.Tasks.Task.Wait();Don't use Task.Wait. Use Task.WaitSafely() to ensure we avoid deadlocks.
P:System.Threading.Tasks.Task`1.Result;Don't use Task.Result. Use Task.GetResultSafely() to ensure we avoid deadlocks.
M:System.Threading.ManualResetEventSlim.Wait();Specify a timeout to avoid waiting forever.
+M:System.Char.ToLower(System.Char);char.ToLower() changes behaviour depending on CultureInfo.CurrentCulture. Use char.ToLowerInvariant() instead. If wanting culture-sensitive behaviour, explicitly provide CultureInfo.CurrentCulture.
+M:System.Char.ToUpper(System.Char);char.ToUpper() changes behaviour depending on CultureInfo.CurrentCulture. Use char.ToUpperInvariant() instead. If wanting culture-sensitive behaviour, explicitly provide CultureInfo.CurrentCulture.
M:System.String.ToLower();string.ToLower() changes behaviour depending on CultureInfo.CurrentCulture. Use string.ToLowerInvariant() instead. If wanting culture-sensitive behaviour, explicitly provide CultureInfo.CurrentCulture or use LocalisableString.
M:System.String.ToUpper();string.ToUpper() changes behaviour depending on CultureInfo.CurrentCulture. Use string.ToUpperInvariant() instead. If wanting culture-sensitive behaviour, explicitly provide CultureInfo.CurrentCulture or use LocalisableString.
M:Humanizer.InflectorExtensions.Pascalize(System.String);Humanizer's .Pascalize() extension method changes behaviour depending on CultureInfo.CurrentCulture. Use StringDehumanizeExtensions.ToPascalCase() instead.
diff --git a/Directory.Build.props b/Directory.Build.props
index 235feea8ce..734374c840 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,7 +1,7 @@
- 9.0
+ 10.0trueenable
@@ -17,7 +17,7 @@
-
+
diff --git a/Gemfile b/Gemfile
deleted file mode 100644
index cdd3a6b349..0000000000
--- a/Gemfile
+++ /dev/null
@@ -1,6 +0,0 @@
-source "https://rubygems.org"
-
-gem "fastlane"
-
-plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
-eval_gemfile(plugins_path) if File.exist?(plugins_path)
diff --git a/Gemfile.lock b/Gemfile.lock
deleted file mode 100644
index cae682ec2b..0000000000
--- a/Gemfile.lock
+++ /dev/null
@@ -1,234 +0,0 @@
-GEM
- remote: https://rubygems.org/
- specs:
- CFPropertyList (3.0.5)
- rexml
- addressable (2.8.0)
- public_suffix (>= 2.0.2, < 5.0)
- artifactory (3.0.15)
- atomos (0.1.3)
- aws-eventstream (1.2.0)
- aws-partitions (1.601.0)
- aws-sdk-core (3.131.2)
- aws-eventstream (~> 1, >= 1.0.2)
- aws-partitions (~> 1, >= 1.525.0)
- aws-sigv4 (~> 1.1)
- jmespath (~> 1, >= 1.6.1)
- aws-sdk-kms (1.57.0)
- aws-sdk-core (~> 3, >= 3.127.0)
- aws-sigv4 (~> 1.1)
- aws-sdk-s3 (1.114.0)
- aws-sdk-core (~> 3, >= 3.127.0)
- aws-sdk-kms (~> 1)
- aws-sigv4 (~> 1.4)
- aws-sigv4 (1.5.0)
- aws-eventstream (~> 1, >= 1.0.2)
- babosa (1.0.4)
- claide (1.1.0)
- colored (1.2)
- colored2 (3.1.2)
- commander (4.6.0)
- highline (~> 2.0.0)
- declarative (0.0.20)
- digest-crc (0.6.4)
- rake (>= 12.0.0, < 14.0.0)
- domain_name (0.5.20190701)
- unf (>= 0.0.5, < 1.0.0)
- dotenv (2.7.6)
- emoji_regex (3.2.3)
- excon (0.92.3)
- faraday (1.10.0)
- faraday-em_http (~> 1.0)
- faraday-em_synchrony (~> 1.0)
- faraday-excon (~> 1.1)
- faraday-httpclient (~> 1.0)
- faraday-multipart (~> 1.0)
- faraday-net_http (~> 1.0)
- faraday-net_http_persistent (~> 1.0)
- faraday-patron (~> 1.0)
- faraday-rack (~> 1.0)
- faraday-retry (~> 1.0)
- ruby2_keywords (>= 0.0.4)
- faraday-cookie_jar (0.0.7)
- faraday (>= 0.8.0)
- http-cookie (~> 1.0.0)
- faraday-em_http (1.0.0)
- faraday-em_synchrony (1.0.0)
- faraday-excon (1.1.0)
- faraday-httpclient (1.0.1)
- faraday-multipart (1.0.4)
- multipart-post (~> 2)
- faraday-net_http (1.0.1)
- faraday-net_http_persistent (1.2.0)
- faraday-patron (1.0.0)
- faraday-rack (1.0.0)
- faraday-retry (1.0.3)
- faraday_middleware (1.2.0)
- faraday (~> 1.0)
- fastimage (2.2.6)
- fastlane (2.206.2)
- CFPropertyList (>= 2.3, < 4.0.0)
- addressable (>= 2.8, < 3.0.0)
- artifactory (~> 3.0)
- aws-sdk-s3 (~> 1.0)
- babosa (>= 1.0.3, < 2.0.0)
- bundler (>= 1.12.0, < 3.0.0)
- colored
- commander (~> 4.6)
- dotenv (>= 2.1.1, < 3.0.0)
- emoji_regex (>= 0.1, < 4.0)
- excon (>= 0.71.0, < 1.0.0)
- faraday (~> 1.0)
- faraday-cookie_jar (~> 0.0.6)
- faraday_middleware (~> 1.0)
- fastimage (>= 2.1.0, < 3.0.0)
- gh_inspector (>= 1.1.2, < 2.0.0)
- google-apis-androidpublisher_v3 (~> 0.3)
- google-apis-playcustomapp_v1 (~> 0.1)
- google-cloud-storage (~> 1.31)
- highline (~> 2.0)
- json (< 3.0.0)
- jwt (>= 2.1.0, < 3)
- mini_magick (>= 4.9.4, < 5.0.0)
- multipart-post (~> 2.0.0)
- naturally (~> 2.2)
- optparse (~> 0.1.1)
- plist (>= 3.1.0, < 4.0.0)
- rubyzip (>= 2.0.0, < 3.0.0)
- security (= 0.1.3)
- simctl (~> 1.6.3)
- terminal-notifier (>= 2.0.0, < 3.0.0)
- terminal-table (>= 1.4.5, < 2.0.0)
- tty-screen (>= 0.6.3, < 1.0.0)
- tty-spinner (>= 0.8.0, < 1.0.0)
- word_wrap (~> 1.0.0)
- xcodeproj (>= 1.13.0, < 2.0.0)
- xcpretty (~> 0.3.0)
- xcpretty-travis-formatter (>= 0.0.3)
- fastlane-plugin-clean_testflight_testers (0.3.0)
- fastlane-plugin-souyuz (0.11.1)
- souyuz (= 0.11.1)
- fastlane-plugin-xamarin (0.6.3)
- gh_inspector (1.1.3)
- google-apis-androidpublisher_v3 (0.23.0)
- google-apis-core (>= 0.6, < 2.a)
- google-apis-core (0.6.0)
- addressable (~> 2.5, >= 2.5.1)
- googleauth (>= 0.16.2, < 2.a)
- httpclient (>= 2.8.1, < 3.a)
- mini_mime (~> 1.0)
- representable (~> 3.0)
- retriable (>= 2.0, < 4.a)
- rexml
- webrick
- google-apis-iamcredentials_v1 (0.12.0)
- google-apis-core (>= 0.6, < 2.a)
- google-apis-playcustomapp_v1 (0.9.0)
- google-apis-core (>= 0.6, < 2.a)
- google-apis-storage_v1 (0.16.0)
- google-apis-core (>= 0.6, < 2.a)
- google-cloud-core (1.6.0)
- google-cloud-env (~> 1.0)
- google-cloud-errors (~> 1.0)
- google-cloud-env (1.6.0)
- faraday (>= 0.17.3, < 3.0)
- google-cloud-errors (1.2.0)
- google-cloud-storage (1.36.2)
- addressable (~> 2.8)
- digest-crc (~> 0.4)
- google-apis-iamcredentials_v1 (~> 0.1)
- google-apis-storage_v1 (~> 0.1)
- google-cloud-core (~> 1.6)
- googleauth (>= 0.16.2, < 2.a)
- mini_mime (~> 1.0)
- googleauth (1.2.0)
- faraday (>= 0.17.3, < 3.a)
- jwt (>= 1.4, < 3.0)
- memoist (~> 0.16)
- multi_json (~> 1.11)
- os (>= 0.9, < 2.0)
- signet (>= 0.16, < 2.a)
- highline (2.0.3)
- http-cookie (1.0.5)
- domain_name (~> 0.5)
- httpclient (2.8.3)
- jmespath (1.6.1)
- json (2.6.2)
- jwt (2.4.1)
- memoist (0.16.2)
- mini_magick (4.11.0)
- mini_mime (1.1.2)
- mini_portile2 (2.7.1)
- multi_json (1.15.0)
- multipart-post (2.0.0)
- nanaimo (0.3.0)
- naturally (2.2.1)
- nokogiri (1.13.1)
- mini_portile2 (~> 2.7.0)
- racc (~> 1.4)
- optparse (0.1.1)
- os (1.1.4)
- plist (3.6.0)
- public_suffix (4.0.7)
- racc (1.6.0)
- rake (13.0.6)
- representable (3.2.0)
- declarative (< 0.1.0)
- trailblazer-option (>= 0.1.1, < 0.2.0)
- uber (< 0.2.0)
- retriable (3.1.2)
- rexml (3.2.5)
- rouge (2.0.7)
- ruby2_keywords (0.0.5)
- rubyzip (2.3.2)
- security (0.1.3)
- signet (0.17.0)
- addressable (~> 2.8)
- faraday (>= 0.17.5, < 3.a)
- jwt (>= 1.5, < 3.0)
- multi_json (~> 1.10)
- simctl (1.6.8)
- CFPropertyList
- naturally
- souyuz (0.11.1)
- fastlane (>= 2.182.0)
- highline (~> 2.0)
- nokogiri (~> 1.7)
- terminal-notifier (2.0.0)
- terminal-table (1.8.0)
- unicode-display_width (~> 1.1, >= 1.1.1)
- trailblazer-option (0.1.2)
- tty-cursor (0.7.1)
- tty-screen (0.8.1)
- tty-spinner (0.9.3)
- tty-cursor (~> 0.7)
- uber (0.1.0)
- unf (0.1.4)
- unf_ext
- unf_ext (0.0.8.2)
- unicode-display_width (1.8.0)
- webrick (1.7.0)
- word_wrap (1.0.0)
- xcodeproj (1.22.0)
- CFPropertyList (>= 2.3.3, < 4.0)
- atomos (~> 0.1.3)
- claide (>= 1.0.2, < 2.0)
- colored2 (~> 3.1)
- nanaimo (~> 0.3.0)
- rexml (~> 3.2.4)
- xcpretty (0.3.0)
- rouge (~> 2.0.7)
- xcpretty-travis-formatter (1.0.1)
- xcpretty (~> 0.2, >= 0.0.7)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- fastlane
- fastlane-plugin-clean_testflight_testers
- fastlane-plugin-souyuz
- fastlane-plugin-xamarin
-
-BUNDLED WITH
- 2.0.1
diff --git a/README.md b/README.md
index 75d61dad4d..eb2fe6d0eb 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ If you are looking to install or test osu! without setting up a development envi
**Latest build:**
-| [Windows 8.1+ (x64)](https://github.com/ppy/osu/releases/latest/download/install.exe) | macOS 10.15+ ([Intel](https://github.com/ppy/osu/releases/latest/download/osu.app.Intel.zip), [Apple Silicon](https://github.com/ppy/osu/releases/latest/download/osu.app.Apple.Silicon.zip)) | [Linux (x64)](https://github.com/ppy/osu/releases/latest/download/osu.AppImage) | [iOS 10+](https://osu.ppy.sh/home/testflight) | [Android 5+](https://github.com/ppy/osu/releases/latest/download/sh.ppy.osulazer.apk) |
+| [Windows 8.1+ (x64)](https://github.com/ppy/osu/releases/latest/download/install.exe) | macOS 10.15+ ([Intel](https://github.com/ppy/osu/releases/latest/download/osu.app.Intel.zip), [Apple Silicon](https://github.com/ppy/osu/releases/latest/download/osu.app.Apple.Silicon.zip)) | [Linux (x64)](https://github.com/ppy/osu/releases/latest/download/osu.AppImage) | [iOS 13.4+](https://osu.ppy.sh/home/testflight) | [Android 5+](https://github.com/ppy/osu/releases/latest/download/sh.ppy.osulazer.apk) |
| ------------- | ------------- | ------------- | ------------- | ------------- |
- The iOS testflight link may fill up (Apple has a hard limit of 10,000 users). We reset it occasionally when this happens. Please do not ask about this. Check back regularly for link resets or follow [peppy](https://twitter.com/ppy) on twitter for announcements of link resets.
@@ -101,13 +101,11 @@ JetBrains ReSharper InspectCode is also used for wider rule sets. You can run it
## Contributing
-When it comes to contributing to the project, the two main things you can do to help out are reporting issues and submitting pull requests. Based on past experiences, we have prepared a [list of contributing guidelines](CONTRIBUTING.md) that should hopefully ease you into our collaboration process and answer the most frequently-asked questions.
-
-Note that while we already have certain standards in place, nothing is set in stone. If you have an issue with the way code is structured, with any libraries we are using, or with any processes involved with contributing, *please* bring it up. We welcome all feedback so we can make contributing to this project as painless as possible.
+When it comes to contributing to the project, the two main things you can do to help out are reporting issues and submitting pull requests. Please refer to the [contributing guidelines](CONTRIBUTING.md) to understand how to help in the most effective way possible.
If you wish to help with localisation efforts, head over to [crowdin](https://crowdin.com/project/osu-web).
-For those interested, we love to reward quality contributions via [bounties](https://docs.google.com/spreadsheets/d/1jNXfj_S3Pb5PErA-czDdC9DUu4IgUbe1Lt8E7CYUJuE/view?&rm=minimal#gid=523803337), paid out via PayPal or osu!supporter tags. Don't hesitate to [request a bounty](https://docs.google.com/forms/d/e/1FAIpQLSet_8iFAgPMG526pBZ2Kic6HSh7XPM3fE8xPcnWNkMzINDdYg/viewform) for your work on this project.
+We love to reward quality contributions. If you have made a large contribution, or are a regular contributor, you are welcome to [submit an expense via opencollective](https://opencollective.com/ppy/expenses/new). If you have any questions, feel free to [reach out to peppy](mailto:pe@ppy.sh) before doing so.
## Licence
diff --git a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/TestSceneOsuGame.cs b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/TestSceneOsuGame.cs
index 5973db908c..ca73074789 100644
--- a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/TestSceneOsuGame.cs
+++ b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/TestSceneOsuGame.cs
@@ -9,7 +9,7 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.EmptyFreeform.Tests
{
- public class TestSceneOsuGame : OsuTestScene
+ public partial class TestSceneOsuGame : OsuTestScene
{
[BackgroundDependencyLoader]
private void load()
diff --git a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/TestSceneOsuPlayer.cs b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/TestSceneOsuPlayer.cs
index 0f2ddf82a5..4b99fa7e09 100644
--- a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/TestSceneOsuPlayer.cs
+++ b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/TestSceneOsuPlayer.cs
@@ -7,7 +7,7 @@ using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.EmptyFreeform.Tests
{
[TestFixture]
- public class TestSceneOsuPlayer : PlayerTestScene
+ public partial class TestSceneOsuPlayer : PlayerTestScene
{
protected override Ruleset CreatePlayerRuleset() => new EmptyFreeformRuleset();
}
diff --git a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/osu.Game.Rulesets.EmptyFreeform.Tests.csproj b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/osu.Game.Rulesets.EmptyFreeform.Tests.csproj
index 936808f38b..a1c53ece03 100644
--- a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/osu.Game.Rulesets.EmptyFreeform.Tests.csproj
+++ b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/osu.Game.Rulesets.EmptyFreeform.Tests.csproj
@@ -9,9 +9,9 @@
false
-
+
-
+
diff --git a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformInputManager.cs b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformInputManager.cs
index b292a28c0d..feac0f22f5 100644
--- a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformInputManager.cs
+++ b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformInputManager.cs
@@ -7,7 +7,7 @@ using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.EmptyFreeform
{
- public class EmptyFreeformInputManager : RulesetInputManager
+ public partial class EmptyFreeformInputManager : RulesetInputManager
{
public EmptyFreeformInputManager(RulesetInfo ruleset)
: base(ruleset, 0, SimultaneousBindingMode.Unique)
diff --git a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformRuleset.cs b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformRuleset.cs
index 1e88f87f09..d7ef84541f 100644
--- a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformRuleset.cs
+++ b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformRuleset.cs
@@ -21,7 +21,7 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.EmptyFreeform
{
- public class EmptyFreeformRuleset : Ruleset
+ public partial class EmptyFreeformRuleset : Ruleset
{
public override string Description => "a very emptyfreeformruleset ruleset";
@@ -56,7 +56,7 @@ namespace osu.Game.Rulesets.EmptyFreeform
public override Drawable CreateIcon() => new Icon(ShortName[0]);
- public class Icon : CompositeDrawable
+ public partial class Icon : CompositeDrawable
{
public Icon(char c)
{
diff --git a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/Objects/Drawables/DrawableEmptyFreeformHitObject.cs b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/Objects/Drawables/DrawableEmptyFreeformHitObject.cs
index 0f38e9fdf8..744e207b57 100644
--- a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/Objects/Drawables/DrawableEmptyFreeformHitObject.cs
+++ b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/Objects/Drawables/DrawableEmptyFreeformHitObject.cs
@@ -9,7 +9,7 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.EmptyFreeform.Objects.Drawables
{
- public class DrawableEmptyFreeformHitObject : DrawableHitObject
+ public partial class DrawableEmptyFreeformHitObject : DrawableHitObject
{
public DrawableEmptyFreeformHitObject(EmptyFreeformHitObject hitObject)
: base(hitObject)
diff --git a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/UI/DrawableEmptyFreeformRuleset.cs b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/UI/DrawableEmptyFreeformRuleset.cs
index 290f35f516..608e8d3c07 100644
--- a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/UI/DrawableEmptyFreeformRuleset.cs
+++ b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/UI/DrawableEmptyFreeformRuleset.cs
@@ -17,7 +17,7 @@ using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.EmptyFreeform.UI
{
[Cached]
- public class DrawableEmptyFreeformRuleset : DrawableRuleset
+ public partial class DrawableEmptyFreeformRuleset : DrawableRuleset
{
public DrawableEmptyFreeformRuleset(EmptyFreeformRuleset ruleset, IBeatmap beatmap, IReadOnlyList mods = null)
: base(ruleset, beatmap, mods)
diff --git a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/UI/EmptyFreeformPlayfield.cs b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/UI/EmptyFreeformPlayfield.cs
index 9df5935c45..532e88d55e 100644
--- a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/UI/EmptyFreeformPlayfield.cs
+++ b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/UI/EmptyFreeformPlayfield.cs
@@ -8,7 +8,7 @@ using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.EmptyFreeform.UI
{
[Cached]
- public class EmptyFreeformPlayfield : Playfield
+ public partial class EmptyFreeformPlayfield : Playfield
{
[BackgroundDependencyLoader]
private void load()
diff --git a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/osu.Game.Rulesets.EmptyFreeform.csproj b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/osu.Game.Rulesets.EmptyFreeform.csproj
index 092a013614..d09e7647e0 100644
--- a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/osu.Game.Rulesets.EmptyFreeform.csproj
+++ b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/osu.Game.Rulesets.EmptyFreeform.csproj
@@ -1,6 +1,6 @@
- netstandard2.1
+ net6.0osu.Game.Rulesets.EmptyFreeformLibraryAnyCPU
@@ -12,4 +12,4 @@
-
\ No newline at end of file
+
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/TestSceneOsuGame.cs b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/TestSceneOsuGame.cs
index b75a5ec187..c105e9c040 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/TestSceneOsuGame.cs
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/TestSceneOsuGame.cs
@@ -9,7 +9,7 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.Pippidon.Tests
{
- public class TestSceneOsuGame : OsuTestScene
+ public partial class TestSceneOsuGame : OsuTestScene
{
[BackgroundDependencyLoader]
private void load()
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/TestSceneOsuPlayer.cs b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/TestSceneOsuPlayer.cs
index f00528900c..793d3933d7 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/TestSceneOsuPlayer.cs
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/TestSceneOsuPlayer.cs
@@ -7,7 +7,7 @@ using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Pippidon.Tests
{
[TestFixture]
- public class TestSceneOsuPlayer : PlayerTestScene
+ public partial class TestSceneOsuPlayer : PlayerTestScene
{
protected override Ruleset CreatePlayerRuleset() => new PippidonRuleset();
}
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj
index 35e7742172..683e9fd5e8 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj
@@ -9,9 +9,9 @@
false
-
+
-
+
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/Objects/Drawables/DrawablePippidonHitObject.cs b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/Objects/Drawables/DrawablePippidonHitObject.cs
index 399d6adda2..c5ada4288d 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/Objects/Drawables/DrawablePippidonHitObject.cs
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/Objects/Drawables/DrawablePippidonHitObject.cs
@@ -8,7 +8,6 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Game.Audio;
-using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Scoring;
using osuTK;
@@ -16,7 +15,7 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.Pippidon.Objects.Drawables
{
- public class DrawablePippidonHitObject : DrawableHitObject
+ public partial class DrawablePippidonHitObject : DrawableHitObject
{
private const double time_preempt = 600;
private const double time_fadein = 400;
@@ -44,7 +43,7 @@ namespace osu.Game.Rulesets.Pippidon.Objects.Drawables
public override IEnumerable GetSamples() => new[]
{
- new HitSampleInfo(HitSampleInfo.HIT_NORMAL, SampleControlPoint.DEFAULT_BANK)
+ new HitSampleInfo(HitSampleInfo.HIT_NORMAL)
};
protected override void CheckForResult(bool userTriggered, double timeOffset)
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonInputManager.cs b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonInputManager.cs
index aa7fa3188b..85b264bc67 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonInputManager.cs
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonInputManager.cs
@@ -7,7 +7,7 @@ using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.Pippidon
{
- public class PippidonInputManager : RulesetInputManager
+ public partial class PippidonInputManager : RulesetInputManager
{
public PippidonInputManager(RulesetInfo ruleset)
: base(ruleset, 0, SimultaneousBindingMode.Unique)
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonRulesetIcon.cs b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonRulesetIcon.cs
index ff10233b50..1a672d10dd 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonRulesetIcon.cs
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonRulesetIcon.cs
@@ -8,7 +8,7 @@ using osu.Framework.Graphics.Textures;
namespace osu.Game.Rulesets.Pippidon
{
- public class PippidonRulesetIcon : Sprite
+ public partial class PippidonRulesetIcon : Sprite
{
private readonly Ruleset ruleset;
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/DrawablePippidonRuleset.cs b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/DrawablePippidonRuleset.cs
index d923963bef..982a80cb7a 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/DrawablePippidonRuleset.cs
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/DrawablePippidonRuleset.cs
@@ -17,7 +17,7 @@ using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.Pippidon.UI
{
[Cached]
- public class DrawablePippidonRuleset : DrawableRuleset
+ public partial class DrawablePippidonRuleset : DrawableRuleset
{
public DrawablePippidonRuleset(PippidonRuleset ruleset, IBeatmap beatmap, IReadOnlyList mods = null)
: base(ruleset, beatmap, mods)
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/PippidonCursorContainer.cs b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/PippidonCursorContainer.cs
index 9de3f4ba14..20dd2e7c31 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/PippidonCursorContainer.cs
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/PippidonCursorContainer.cs
@@ -10,7 +10,7 @@ using osuTK;
namespace osu.Game.Rulesets.Pippidon.UI
{
- public class PippidonCursorContainer : GameplayCursorContainer
+ public partial class PippidonCursorContainer : GameplayCursorContainer
{
private Sprite cursorSprite;
private Texture cursorTexture;
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/PippidonPlayfield.cs b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/PippidonPlayfield.cs
index b5a97c5ea3..62e162ae4b 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/PippidonPlayfield.cs
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/PippidonPlayfield.cs
@@ -8,7 +8,7 @@ using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.Pippidon.UI
{
[Cached]
- public class PippidonPlayfield : Playfield
+ public partial class PippidonPlayfield : Playfield
{
protected override GameplayCursorContainer CreateCursor() => new PippidonCursorContainer();
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/PippidonPlayfieldAdjustmentContainer.cs b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/PippidonPlayfieldAdjustmentContainer.cs
index 9236683827..b46e795bbc 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/PippidonPlayfieldAdjustmentContainer.cs
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/PippidonPlayfieldAdjustmentContainer.cs
@@ -7,7 +7,7 @@ using osuTK;
namespace osu.Game.Rulesets.Pippidon.UI
{
- public class PippidonPlayfieldAdjustmentContainer : PlayfieldAdjustmentContainer
+ public partial class PippidonPlayfieldAdjustmentContainer : PlayfieldAdjustmentContainer
{
public PippidonPlayfieldAdjustmentContainer()
{
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj
index a3607343c9..9c8867f4ef 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj
@@ -1,6 +1,6 @@
- netstandard2.1
+ net6.0osu.Game.Rulesets.PippidonLibraryAnyCPU
@@ -12,4 +12,4 @@
-
\ No newline at end of file
+
diff --git a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/TestSceneOsuGame.cs b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/TestSceneOsuGame.cs
index ffe921b54c..a9a3c2eb5b 100644
--- a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/TestSceneOsuGame.cs
+++ b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/TestSceneOsuGame.cs
@@ -9,7 +9,7 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.EmptyScrolling.Tests
{
- public class TestSceneOsuGame : OsuTestScene
+ public partial class TestSceneOsuGame : OsuTestScene
{
[BackgroundDependencyLoader]
private void load()
diff --git a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/TestSceneOsuPlayer.cs b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/TestSceneOsuPlayer.cs
index 9460576196..2be3862833 100644
--- a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/TestSceneOsuPlayer.cs
+++ b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/TestSceneOsuPlayer.cs
@@ -7,7 +7,7 @@ using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.EmptyScrolling.Tests
{
[TestFixture]
- public class TestSceneOsuPlayer : PlayerTestScene
+ public partial class TestSceneOsuPlayer : PlayerTestScene
{
protected override Ruleset CreatePlayerRuleset() => new EmptyScrollingRuleset();
}
diff --git a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/osu.Game.Rulesets.EmptyScrolling.Tests.csproj b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/osu.Game.Rulesets.EmptyScrolling.Tests.csproj
index c1044965b5..b7a7fff18a 100644
--- a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/osu.Game.Rulesets.EmptyScrolling.Tests.csproj
+++ b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/osu.Game.Rulesets.EmptyScrolling.Tests.csproj
@@ -9,9 +9,9 @@
false
-
+
-
+
diff --git a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingInputManager.cs b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingInputManager.cs
index 632e04f301..a7b4ae61f0 100644
--- a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingInputManager.cs
+++ b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingInputManager.cs
@@ -7,7 +7,7 @@ using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.EmptyScrolling
{
- public class EmptyScrollingInputManager : RulesetInputManager
+ public partial class EmptyScrollingInputManager : RulesetInputManager
{
public EmptyScrollingInputManager(RulesetInfo ruleset)
: base(ruleset, 0, SimultaneousBindingMode.Unique)
diff --git a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/Objects/Drawables/DrawableEmptyScrollingHitObject.cs b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/Objects/Drawables/DrawableEmptyScrollingHitObject.cs
index b5ff0cde7c..a3c3b89105 100644
--- a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/Objects/Drawables/DrawableEmptyScrollingHitObject.cs
+++ b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/Objects/Drawables/DrawableEmptyScrollingHitObject.cs
@@ -9,7 +9,7 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.EmptyScrolling.Objects.Drawables
{
- public class DrawableEmptyScrollingHitObject : DrawableHitObject
+ public partial class DrawableEmptyScrollingHitObject : DrawableHitObject
{
public DrawableEmptyScrollingHitObject(EmptyScrollingHitObject hitObject)
: base(hitObject)
diff --git a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/UI/DrawableEmptyScrollingRuleset.cs b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/UI/DrawableEmptyScrollingRuleset.cs
index 620a4abc51..99598fc113 100644
--- a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/UI/DrawableEmptyScrollingRuleset.cs
+++ b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/UI/DrawableEmptyScrollingRuleset.cs
@@ -18,7 +18,7 @@ using osu.Game.Rulesets.UI.Scrolling;
namespace osu.Game.Rulesets.EmptyScrolling.UI
{
[Cached]
- public class DrawableEmptyScrollingRuleset : DrawableScrollingRuleset
+ public partial class DrawableEmptyScrollingRuleset : DrawableScrollingRuleset
{
public DrawableEmptyScrollingRuleset(EmptyScrollingRuleset ruleset, IBeatmap beatmap, IReadOnlyList mods = null)
: base(ruleset, beatmap, mods)
diff --git a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/UI/EmptyScrollingPlayfield.cs b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/UI/EmptyScrollingPlayfield.cs
index 56620e44b3..3770ba8172 100644
--- a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/UI/EmptyScrollingPlayfield.cs
+++ b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/UI/EmptyScrollingPlayfield.cs
@@ -8,7 +8,7 @@ using osu.Game.Rulesets.UI.Scrolling;
namespace osu.Game.Rulesets.EmptyScrolling.UI
{
[Cached]
- public class EmptyScrollingPlayfield : ScrollingPlayfield
+ public partial class EmptyScrollingPlayfield : ScrollingPlayfield
{
[BackgroundDependencyLoader]
private void load()
diff --git a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/osu.Game.Rulesets.EmptyScrolling.csproj b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/osu.Game.Rulesets.EmptyScrolling.csproj
index 2ea52429ab..5bf3884f53 100644
--- a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/osu.Game.Rulesets.EmptyScrolling.csproj
+++ b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/osu.Game.Rulesets.EmptyScrolling.csproj
@@ -1,6 +1,6 @@
- netstandard2.1
+ net6.0osu.Game.Rulesets.EmptyScrollingLibraryAnyCPU
@@ -12,4 +12,4 @@
-
\ No newline at end of file
+
diff --git a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/TestSceneOsuGame.cs b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/TestSceneOsuGame.cs
index b75a5ec187..c105e9c040 100644
--- a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/TestSceneOsuGame.cs
+++ b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/TestSceneOsuGame.cs
@@ -9,7 +9,7 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.Pippidon.Tests
{
- public class TestSceneOsuGame : OsuTestScene
+ public partial class TestSceneOsuGame : OsuTestScene
{
[BackgroundDependencyLoader]
private void load()
diff --git a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/TestSceneOsuPlayer.cs b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/TestSceneOsuPlayer.cs
index f00528900c..793d3933d7 100644
--- a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/TestSceneOsuPlayer.cs
+++ b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/TestSceneOsuPlayer.cs
@@ -7,7 +7,7 @@ using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Pippidon.Tests
{
[TestFixture]
- public class TestSceneOsuPlayer : PlayerTestScene
+ public partial class TestSceneOsuPlayer : PlayerTestScene
{
protected override Ruleset CreatePlayerRuleset() => new PippidonRuleset();
}
diff --git a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj
index 35e7742172..683e9fd5e8 100644
--- a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj
+++ b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj
@@ -9,9 +9,9 @@
false
-
+
-
+
diff --git a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/Objects/Drawables/DrawablePippidonHitObject.cs b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/Objects/Drawables/DrawablePippidonHitObject.cs
index e458cacef9..d198fa81cb 100644
--- a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/Objects/Drawables/DrawablePippidonHitObject.cs
+++ b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/Objects/Drawables/DrawablePippidonHitObject.cs
@@ -8,7 +8,6 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Game.Audio;
-using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Pippidon.UI;
using osu.Game.Rulesets.Scoring;
@@ -17,7 +16,7 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.Pippidon.Objects.Drawables
{
- public class DrawablePippidonHitObject : DrawableHitObject
+ public partial class DrawablePippidonHitObject : DrawableHitObject
{
private BindableNumber currentLane;
@@ -44,7 +43,7 @@ namespace osu.Game.Rulesets.Pippidon.Objects.Drawables
public override IEnumerable GetSamples() => new[]
{
- new HitSampleInfo(HitSampleInfo.HIT_NORMAL, SampleControlPoint.DEFAULT_BANK)
+ new HitSampleInfo(HitSampleInfo.HIT_NORMAL)
};
protected override void CheckForResult(bool userTriggered, double timeOffset)
diff --git a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonInputManager.cs b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonInputManager.cs
index c9e6e6faaa..a31c1bf832 100644
--- a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonInputManager.cs
+++ b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonInputManager.cs
@@ -7,7 +7,7 @@ using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.Pippidon
{
- public class PippidonInputManager : RulesetInputManager
+ public partial class PippidonInputManager : RulesetInputManager
{
public PippidonInputManager(RulesetInfo ruleset)
: base(ruleset, 0, SimultaneousBindingMode.Unique)
diff --git a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonRulesetIcon.cs b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonRulesetIcon.cs
index 6b87d93951..75005a3743 100644
--- a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonRulesetIcon.cs
+++ b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonRulesetIcon.cs
@@ -9,7 +9,7 @@ using osu.Framework.Graphics.Textures;
namespace osu.Game.Rulesets.Pippidon
{
- public class PippidonRulesetIcon : Sprite
+ public partial class PippidonRulesetIcon : Sprite
{
private readonly Ruleset ruleset;
diff --git a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/UI/DrawablePippidonRuleset.cs b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/UI/DrawablePippidonRuleset.cs
index 9a73dd7790..1e7e09be67 100644
--- a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/UI/DrawablePippidonRuleset.cs
+++ b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/UI/DrawablePippidonRuleset.cs
@@ -18,7 +18,7 @@ using osu.Game.Rulesets.UI.Scrolling;
namespace osu.Game.Rulesets.Pippidon.UI
{
[Cached]
- public class DrawablePippidonRuleset : DrawableScrollingRuleset
+ public partial class DrawablePippidonRuleset : DrawableScrollingRuleset
{
public DrawablePippidonRuleset(PippidonRuleset ruleset, IBeatmap beatmap, IReadOnlyList mods = null)
: base(ruleset, beatmap, mods)
diff --git a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/UI/PippidonCharacter.cs b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/UI/PippidonCharacter.cs
index 98dba622d0..33d349da62 100644
--- a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/UI/PippidonCharacter.cs
+++ b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/UI/PippidonCharacter.cs
@@ -15,7 +15,7 @@ using osuTK;
namespace osu.Game.Rulesets.Pippidon.UI
{
- public class PippidonCharacter : BeatSyncedContainer, IKeyBindingHandler
+ public partial class PippidonCharacter : BeatSyncedContainer, IKeyBindingHandler
{
public readonly BindableInt LanePosition = new BindableInt
{
diff --git a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/UI/PippidonPlayfield.cs b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/UI/PippidonPlayfield.cs
index ab8c6bb2e9..a90326e935 100644
--- a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/UI/PippidonPlayfield.cs
+++ b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/UI/PippidonPlayfield.cs
@@ -16,7 +16,7 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.Pippidon.UI
{
[Cached]
- public class PippidonPlayfield : ScrollingPlayfield
+ public partial class PippidonPlayfield : ScrollingPlayfield
{
public const float LANE_HEIGHT = 70;
@@ -60,7 +60,7 @@ namespace osu.Game.Rulesets.Pippidon.UI
});
}
- private class LaneContainer : BeatSyncedContainer
+ private partial class LaneContainer : BeatSyncedContainer
{
private OsuColour colours;
private FillFlowContainer fill;
@@ -99,7 +99,7 @@ namespace osu.Game.Rulesets.Pippidon.UI
}
}
- private class Lane : CompositeDrawable
+ private partial class Lane : CompositeDrawable
{
public Lane()
{
diff --git a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj
index a3607343c9..9c8867f4ef 100644
--- a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj
+++ b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj
@@ -1,6 +1,6 @@
- netstandard2.1
+ net6.0osu.Game.Rulesets.PippidonLibraryAnyCPU
@@ -12,4 +12,4 @@
-
\ No newline at end of file
+
diff --git a/UseLocalFramework.ps1 b/UseLocalFramework.ps1
new file mode 100644
index 0000000000..9f4547d980
--- /dev/null
+++ b/UseLocalFramework.ps1
@@ -0,0 +1,55 @@
+# Run this script to use a local copy of osu-framework rather than fetching it from nuget.
+# It expects the osu-framework directory to be at the same level as the osu directory
+#
+# https://github.com/ppy/osu-framework/wiki/Testing-local-framework-checkout-with-other-projects
+
+$GAME_CSPROJ="osu.Game/osu.Game.csproj"
+$ANDROID_PROPS="osu.Android.props"
+$IOS_PROPS="osu.iOS.props"
+$SLN="osu.sln"
+
+dotnet remove $GAME_CSPROJ reference ppy.osu.Framework;
+dotnet remove $ANDROID_PROPS reference ppy.osu.Framework.Android;
+dotnet remove $IOS_PROPS reference ppy.osu.Framework.iOS;
+
+dotnet sln $SLN add ../osu-framework/osu.Framework/osu.Framework.csproj `
+ ../osu-framework/osu.Framework.NativeLibs/osu.Framework.NativeLibs.csproj `
+ ../osu-framework/osu.Framework.Android/osu.Framework.Android.csproj `
+ ../osu-framework/osu.Framework.iOS/osu.Framework.iOS.csproj;
+
+dotnet add $GAME_CSPROJ reference ../osu-framework/osu.Framework/osu.Framework.csproj;
+dotnet add $ANDROID_PROPS reference ../osu-framework/osu.Framework.Android/osu.Framework.Android.csproj;
+dotnet add $IOS_PROPS reference ../osu-framework/osu.Framework.iOS/osu.Framework.iOS.csproj;
+
+# workaround for dotnet add not inserting $(MSBuildThisFileDirectory) on props files
+(Get-Content "osu.Android.props") -replace "`"..\\osu-framework", "`"`$(MSBuildThisFileDirectory)..\osu-framework" | Set-Content "osu.Android.props"
+(Get-Content "osu.iOS.props") -replace "`"..\\osu-framework", "`"`$(MSBuildThisFileDirectory)..\osu-framework" | Set-Content "osu.iOS.props"
+
+# needed because iOS framework nupkg includes a set of properties to work around certain issues during building,
+# and those get ignored when referencing framework via project, threfore we have to manually include it via props reference.
+(Get-Content "osu.iOS.props") |
+ Foreach-Object {
+ if ($_ -match "")
+ {
+ " "
+ }
+
+ $_
+ } | Set-Content "osu.iOS.props"
+
+$TMP=New-TemporaryFile
+
+$SLNF=Get-Content "osu.Desktop.slnf" | ConvertFrom-Json
+$SLNF.solution.projects += ("../osu-framework/osu.Framework/osu.Framework.csproj", "../osu-framework/osu.Framework.NativeLibs/osu.Framework.NativeLibs.csproj")
+ConvertTo-Json $SLNF | Out-File $TMP -Encoding UTF8
+Move-Item -Path $TMP -Destination "osu.Desktop.slnf" -Force
+
+$SLNF=Get-Content "osu.Android.slnf" | ConvertFrom-Json
+$SLNF.solution.projects += ("../osu-framework/osu.Framework/osu.Framework.csproj", "../osu-framework/osu.Framework.NativeLibs/osu.Framework.NativeLibs.csproj", "../osu-framework/osu.Framework.Android/osu.Framework.Android.csproj")
+ConvertTo-Json $SLNF | Out-File $TMP -Encoding UTF8
+Move-Item -Path $TMP -Destination "osu.Android.slnf" -Force
+
+$SLNF=Get-Content "osu.iOS.slnf" | ConvertFrom-Json
+$SLNF.solution.projects += ("../osu-framework/osu.Framework/osu.Framework.csproj", "../osu-framework/osu.Framework.NativeLibs/osu.Framework.NativeLibs.csproj", "../osu-framework/osu.Framework.iOS/osu.Framework.iOS.csproj")
+ConvertTo-Json $SLNF | Out-File $TMP -Encoding UTF8
+Move-Item -Path $TMP -Destination "osu.iOS.slnf" -Force
diff --git a/UseLocalFramework.sh b/UseLocalFramework.sh
new file mode 100755
index 0000000000..c12b388e96
--- /dev/null
+++ b/UseLocalFramework.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+# Run this script to use a local copy of osu-framework rather than fetching it from nuget.
+# It expects the osu-framework directory to be at the same level as the osu directory
+#
+# https://github.com/ppy/osu-framework/wiki/Testing-local-framework-checkout-with-other-projects
+
+GAME_CSPROJ="osu.Game/osu.Game.csproj"
+ANDROID_PROPS="osu.Android.props"
+IOS_PROPS="osu.iOS.props"
+SLN="osu.sln"
+
+dotnet remove $GAME_CSPROJ reference ppy.osu.Framework
+dotnet remove $ANDROID_PROPS reference ppy.osu.Framework.Android
+dotnet remove $IOS_PROPS reference ppy.osu.Framework.iOS
+
+dotnet sln $SLN add ../osu-framework/osu.Framework/osu.Framework.csproj \
+ ../osu-framework/osu.Framework.NativeLibs/osu.Framework.NativeLibs.csproj \
+ ../osu-framework/osu.Framework.Android/osu.Framework.Android.csproj \
+ ../osu-framework/osu.Framework.iOS/osu.Framework.iOS.csproj
+
+dotnet add $GAME_CSPROJ reference ../osu-framework/osu.Framework/osu.Framework.csproj
+dotnet add $ANDROID_PROPS reference ../osu-framework/osu.Framework.Android/osu.Framework.Android.csproj
+dotnet add $IOS_PROPS reference ../osu-framework/osu.Framework.iOS/osu.Framework.iOS.csproj
+
+# workaround for dotnet add not inserting $(MSBuildThisFileDirectory) on props files
+sed -i.bak 's:"..\\osu-framework:"$(MSBuildThisFileDirectory)..\\osu-framework:g' ./osu.Android.props && rm osu.Android.props.bak
+sed -i.bak 's:"..\\osu-framework:"$(MSBuildThisFileDirectory)..\\osu-framework:g' ./osu.iOS.props && rm osu.iOS.props.bak
+
+# needed because iOS framework nupkg includes a set of properties to work around certain issues during building,
+# and those get ignored when referencing framework via project, threfore we have to manually include it via props reference.
+sed -i.bak '/<\/Project>/i\
+ \
+' ./osu.iOS.props && rm osu.iOS.props.bak
+
+tmp=$(mktemp)
+
+jq '.solution.projects += ["../osu-framework/osu.Framework/osu.Framework.csproj", "../osu-framework/osu.Framework.NativeLibs/osu.Framework.NativeLibs.csproj"]' osu.Desktop.slnf > $tmp
+mv -f $tmp osu.Desktop.slnf
+
+jq '.solution.projects += ["../osu-framework/osu.Framework/osu.Framework.csproj", "../osu-framework/osu.Framework.NativeLibs/osu.Framework.NativeLibs.csproj", "../osu-framework/osu.Framework.Android/osu.Framework.Android.csproj"]' osu.Android.slnf > $tmp
+mv -f $tmp osu.Android.slnf
+
+jq '.solution.projects += ["../osu-framework/osu.Framework/osu.Framework.csproj", "../osu-framework/osu.Framework.NativeLibs/osu.Framework.NativeLibs.csproj", "../osu-framework/osu.Framework.iOS/osu.Framework.iOS.csproj"]' osu.iOS.slnf > $tmp
+mv -f $tmp osu.iOS.slnf
diff --git a/UseLocalResources.ps1 b/UseLocalResources.ps1
new file mode 100644
index 0000000000..f9d9df01bb
--- /dev/null
+++ b/UseLocalResources.ps1
@@ -0,0 +1,12 @@
+$CSPROJ="osu.Game/osu.Game.csproj"
+$SLN="osu.sln"
+
+dotnet remove $CSPROJ package ppy.osu.Game.Resources;
+dotnet sln $SLN add ../osu-resources/osu.Game.Resources/osu.Game.Resources.csproj
+dotnet add $CSPROJ reference ../osu-resources/osu.Game.Resources/osu.Game.Resources.csproj
+
+$SLNF=Get-Content "osu.Desktop.slnf" | ConvertFrom-Json
+$TMP=New-TemporaryFile
+$SLNF.solution.projects += ("../osu-resources/osu.Game.Resources/osu.Game.Resources.csproj")
+ConvertTo-Json $SLNF | Out-File $TMP -Encoding UTF8
+Move-Item -Path $TMP -Destination "osu.Desktop.slnf" -Force
diff --git a/UseLocalResources.sh b/UseLocalResources.sh
new file mode 100755
index 0000000000..6d9d2b6016
--- /dev/null
+++ b/UseLocalResources.sh
@@ -0,0 +1,11 @@
+CSPROJ="osu.Game/osu.Game.csproj"
+SLN="osu.sln"
+
+dotnet remove $CSPROJ package ppy.osu.Game.Resources;
+dotnet sln $SLN add ../osu-resources/osu.Game.Resources/osu.Game.Resources.csproj
+dotnet add $CSPROJ reference ../osu-resources/osu.Game.Resources/osu.Game.Resources.csproj
+
+SLNF="osu.Desktop.slnf"
+TMP=$(mktemp)
+jq '.solution.projects += ["../osu-resources/osu.Game.Resources/osu.Game.Resources.csproj"]' $SLNF > $TMP
+mv -f $TMP $SLNF
diff --git a/appveyor.yml b/appveyor.yml
index 5be73f9875..ed48a997e8 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,6 +1,6 @@
clone_depth: 1
version: '{branch}-{build}'
-image: Visual Studio 2019
+image: Visual Studio 2022
cache:
- '%LOCALAPPDATA%\NuGet\v3-cache -> appveyor.yml'
@@ -11,6 +11,8 @@ dotnet_csproj:
before_build:
- cmd: dotnet --info # Useful when version mismatch between CI and local
+ - cmd: dotnet workload install maui-android # Change to `dotnet workload restore` once there's no old projects
+ - cmd: dotnet workload install maui-ios # Change to `dotnet workload restore` once there's no old projects
- cmd: nuget restore -verbosity quiet # Only nuget.exe knows both new (.NET Core) and old (Xamarin) projects
build:
diff --git a/appveyor_deploy.yml b/appveyor_deploy.yml
index adf98848bc..175c8d0f1b 100644
--- a/appveyor_deploy.yml
+++ b/appveyor_deploy.yml
@@ -1,6 +1,6 @@
clone_depth: 1
version: '{build}'
-image: Visual Studio 2019
+image: Visual Studio 2022
test: off
skip_non_tags: true
configuration: Release
@@ -83,4 +83,4 @@ artifacts:
deploy:
- provider: Environment
- name: nuget
\ No newline at end of file
+ name: nuget
diff --git a/fastlane/Appfile b/fastlane/Appfile
deleted file mode 100644
index 083de66985..0000000000
--- a/fastlane/Appfile
+++ /dev/null
@@ -1,2 +0,0 @@
-app_identifier("sh.ppy.osulazer") # The bundle identifier of your app
-apple_id("apple-dev@ppy.sh") # Your Apple email address
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
deleted file mode 100644
index cc5abf5b03..0000000000
--- a/fastlane/Fastfile
+++ /dev/null
@@ -1,147 +0,0 @@
-update_fastlane
-
-platform :android do
-desc 'Deploy to play store'
- lane :beta do |options|
-
- update_version(
- version: options[:version],
- build: options[:build],
- )
-
- build(options)
-
- supply(
- apk: './osu.Android/bin/Release/sh.ppy.osulazer-Signed.apk',
- package_name: 'sh.ppy.osulazer',
- track: 'alpha', # upload to alpha, we can promote it later
- json_key: options[:json_key],
- )
- end
-
- desc 'Deploy to github release'
- lane :build_github do |options|
-
- update_version(
- version: options[:version],
- build: options[:build],
- )
-
- build(options)
-
- client = HTTPClient.new
- changelog = client.get_content 'https://gist.githubusercontent.com/peppy/aaa2ec1a323554b619671cac6dbbb776/raw'
- changelog.gsub!('$BUILD_ID', options[:build])
-
- set_github_release(
- repository_name: "ppy/osu",
- api_token: ENV["GITHUB_TOKEN"],
- name: options[:build],
- tag_name: options[:build],
- is_draft: true,
- description: changelog,
- commitish: "master",
- upload_assets: ["osu.Android/bin/Release/sh.ppy.osulazer.apk"]
- )
-
- end
-
- desc 'Compile the project'
- lane :build do |options|
- nuget_restore(project_path: 'osu.Android/osu.Android.csproj')
- nuget_restore(project_path: 'osu.Game/osu.Game.csproj')
- nuget_restore(project_path: 'osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj')
- nuget_restore(project_path: 'osu.Game.Rulesets.Taiko/osu.Game.Rulesets.Taiko.csproj')
- nuget_restore(project_path: 'osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj')
- nuget_restore(project_path: 'osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj')
-
- souyuz(
- build_configuration: 'Release',
- solution_path: 'osu.sln',
- platform: "android",
- output_path: "osu.Android/bin/Release/",
- keystore_path: options[:keystore_path],
- keystore_alias: options[:keystore_alias],
- keystore_password: ENV["KEYSTORE_PASSWORD"]
- )
- end
-
- lane :update_version do |options|
-
- split = options[:build].split('.')
- split[1] = split[1].to_s.rjust(4, '0')
- android_build = split.join('')
-
- app_version(
- solution_path: 'osu.sln',
- version: options[:version],
- build: android_build,
- )
- end
-
-end
-
-platform :ios do
- desc 'Deploy to testflight'
- lane :beta do |options|
- update_version(options)
-
- provision(
- type: 'appstore'
- )
-
- build(
- build_configuration: 'Release',
- build_platform: 'iPhone'
- )
-
- client = HTTPClient.new
- changelog = client.get_content 'https://gist.githubusercontent.com/peppy/ab89c29dcc0dce95f39eb218e8fad197/raw'
- changelog.gsub!('$BUILD_ID', options[:build])
-
- pilot(
- wait_processing_interval: 900,
- changelog: changelog,
- groups: ['osu! supporters', 'public'],
- distribute_external: true,
- ipa: './osu.iOS/bin/iPhone/Release/osu.iOS.ipa'
- )
- end
-
- desc 'Compile the project'
- lane :build do
- nuget_restore(project_path: 'osu.iOS/osu.iOS.csproj')
- nuget_restore(project_path: 'osu.Game/osu.Game.csproj')
- nuget_restore(project_path: 'osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj')
- nuget_restore(project_path: 'osu.Game.Rulesets.Taiko/osu.Game.Rulesets.Taiko.csproj')
- nuget_restore(project_path: 'osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj')
- nuget_restore(project_path: 'osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj')
-
- souyuz(
- platform: "ios",
- plist_path: "osu.iOS/Info.plist"
- )
- end
-
- desc 'Install provisioning profiles using match'
- lane :provision do |options|
- if Helper.is_ci?
- options[:readonly] = true
- end
-
- match(options)
- end
-
- lane :update_version do |options|
- options[:plist_path] = 'osu.iOS/Info.plist'
- app_version(options)
- end
-
- lane :testflight_prune_dry do
- clean_testflight_testers(days_of_inactivity:45, dry_run: true)
- end
-
- lane :testflight_prune do
- clean_testflight_testers(days_of_inactivity: 45)
- end
-end
diff --git a/fastlane/Matchfile b/fastlane/Matchfile
deleted file mode 100644
index 40c974b09e..0000000000
--- a/fastlane/Matchfile
+++ /dev/null
@@ -1 +0,0 @@
-git_url('https://github.com/peppy/apple-certificates')
diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile
deleted file mode 100644
index 9f4f47f213..0000000000
--- a/fastlane/Pluginfile
+++ /dev/null
@@ -1,7 +0,0 @@
-# Autogenerated by fastlane
-#
-# Ensure this file is checked in to source control!
-
-gem 'fastlane-plugin-clean_testflight_testers'
-gem 'fastlane-plugin-souyuz'
-gem 'fastlane-plugin-xamarin'
diff --git a/fastlane/README.md b/fastlane/README.md
deleted file mode 100644
index 9d5e11f7cb..0000000000
--- a/fastlane/README.md
+++ /dev/null
@@ -1,109 +0,0 @@
-fastlane documentation
-----
-
-# Installation
-
-Make sure you have the latest version of the Xcode command line tools installed:
-
-```sh
-xcode-select --install
-```
-
-For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
-
-# Available Actions
-
-## Android
-
-### android beta
-
-```sh
-[bundle exec] fastlane android beta
-```
-
-Deploy to play store
-
-### android build_github
-
-```sh
-[bundle exec] fastlane android build_github
-```
-
-Deploy to github release
-
-### android build
-
-```sh
-[bundle exec] fastlane android build
-```
-
-Compile the project
-
-### android update_version
-
-```sh
-[bundle exec] fastlane android update_version
-```
-
-
-
-----
-
-
-## iOS
-
-### ios beta
-
-```sh
-[bundle exec] fastlane ios beta
-```
-
-Deploy to testflight
-
-### ios build
-
-```sh
-[bundle exec] fastlane ios build
-```
-
-Compile the project
-
-### ios provision
-
-```sh
-[bundle exec] fastlane ios provision
-```
-
-Install provisioning profiles using match
-
-### ios update_version
-
-```sh
-[bundle exec] fastlane ios update_version
-```
-
-
-
-### ios testflight_prune_dry
-
-```sh
-[bundle exec] fastlane ios testflight_prune_dry
-```
-
-
-
-### ios testflight_prune
-
-```sh
-[bundle exec] fastlane ios testflight_prune
-```
-
-
-
-----
-
-This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
-
-More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
-
-The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
diff --git a/global.json b/global.json
new file mode 100644
index 0000000000..5dcd5f425a
--- /dev/null
+++ b/global.json
@@ -0,0 +1,7 @@
+{
+ "sdk": {
+ "version": "6.0.100",
+ "rollForward": "latestFeature"
+ }
+}
+
diff --git a/osu.Android.props b/osu.Android.props
index 3f4c8e2d24..6aebae665d 100644
--- a/osu.Android.props
+++ b/osu.Android.props
@@ -1,61 +1,24 @@
- 8.0
- bin\$(Configuration)
- 4
- 2.0
- false
- false
- Library
- 512
- Off
- True
- Xamarin.Android.Net.AndroidClientHandler
- v10.0
- false
- true
- armeabi-v7a;x86;arm64-v8a
- true
- cjk,mideast,other,rare,west
- SdkOnly
- prompt
-
-
- True
- portable
- False
- DEBUG;TRACE
- false
- true
- false
-
-
- false
- None
- True
- false
- False
+ 21.0
+ android-x86;android-arm;android-arm64
+ apk
+ CJK;Mideast;Rare;West;Other;
+ Xamarin.Android.Net.AndroidMessageHandler
+
+ truetrue
+ manifestmerger.jar
-
- osu.licenseheader
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ true
+
diff --git a/osu.Android/AndroidImportTask.cs b/osu.Android/AndroidImportTask.cs
new file mode 100644
index 0000000000..7273a6da5c
--- /dev/null
+++ b/osu.Android/AndroidImportTask.cs
@@ -0,0 +1,63 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using System.IO;
+using System.Threading.Tasks;
+using Android.Content;
+using Android.Net;
+using Android.Provider;
+using osu.Game.Database;
+
+namespace osu.Android
+{
+ public class AndroidImportTask : ImportTask
+ {
+ private readonly ContentResolver contentResolver;
+
+ private readonly Uri uri;
+
+ private AndroidImportTask(Stream stream, string filename, ContentResolver contentResolver, Uri uri)
+ : base(stream, filename)
+ {
+ this.contentResolver = contentResolver;
+ this.uri = uri;
+ }
+
+ public override void DeleteFile()
+ {
+ contentResolver.Delete(uri, null, null);
+ }
+
+ public static async Task Create(ContentResolver contentResolver, Uri uri)
+ {
+ // there are more performant overloads of this method, but this one is the most backwards-compatible
+ // (dates back to API 1).
+
+ var cursor = contentResolver.Query(uri, null, null, null, null);
+
+ if (cursor == null)
+ return null;
+
+ if (!cursor.MoveToFirst())
+ return null;
+
+ int filenameColumn = cursor.GetColumnIndex(IOpenableColumns.DisplayName);
+ string filename = cursor.GetString(filenameColumn) ?? uri.Path ?? string.Empty;
+
+ // SharpCompress requires archive streams to be seekable, which the stream opened by
+ // OpenInputStream() seems to not necessarily be.
+ // copy to an arbitrary-access memory stream to be able to proceed with the import.
+ var copy = new MemoryStream();
+
+ using (var stream = contentResolver.OpenInputStream(uri))
+ {
+ if (stream == null)
+ return null;
+
+ await stream.CopyToAsync(copy).ConfigureAwait(false);
+ }
+
+ return new AndroidImportTask(copy, filename, contentResolver, uri);
+ }
+ }
+}
diff --git a/osu.Android/AndroidJoystickSettings.cs b/osu.Android/AndroidJoystickSettings.cs
index 26e921a426..bf69461f0d 100644
--- a/osu.Android/AndroidJoystickSettings.cs
+++ b/osu.Android/AndroidJoystickSettings.cs
@@ -11,7 +11,7 @@ using osu.Game.Overlays.Settings;
namespace osu.Android
{
- public class AndroidJoystickSettings : SettingsSubsection
+ public partial class AndroidJoystickSettings : SettingsSubsection
{
protected override LocalisableString Header => JoystickSettingsStrings.JoystickGamepad;
diff --git a/osu.Android/Properties/AndroidManifest.xml b/osu.Android/AndroidManifest.xml
similarity index 71%
rename from osu.Android/Properties/AndroidManifest.xml
rename to osu.Android/AndroidManifest.xml
index 165a64a424..bc2f49b1a9 100644
--- a/osu.Android/Properties/AndroidManifest.xml
+++ b/osu.Android/AndroidManifest.xml
@@ -1,5 +1,5 @@
-
-
+
+
\ No newline at end of file
diff --git a/osu.Android/AndroidMouseSettings.cs b/osu.Android/AndroidMouseSettings.cs
index 54b787fd17..d6d7750448 100644
--- a/osu.Android/AndroidMouseSettings.cs
+++ b/osu.Android/AndroidMouseSettings.cs
@@ -14,7 +14,7 @@ using osu.Game.Overlays.Settings.Sections.Input;
namespace osu.Android
{
- public class AndroidMouseSettings : SettingsSubsection
+ public partial class AndroidMouseSettings : SettingsSubsection
{
private readonly AndroidMouseHandler mouseHandler;
diff --git a/osu.Android/GameplayScreenRotationLocker.cs b/osu.Android/GameplayScreenRotationLocker.cs
index 9e849bdc7c..3c39a820cc 100644
--- a/osu.Android/GameplayScreenRotationLocker.cs
+++ b/osu.Android/GameplayScreenRotationLocker.cs
@@ -11,7 +11,7 @@ using osu.Game;
namespace osu.Android
{
- public class GameplayScreenRotationLocker : Component
+ public partial class GameplayScreenRotationLocker : Component
{
private Bindable localUserPlaying;
diff --git a/osu.Android/OsuGameActivity.cs b/osu.Android/OsuGameActivity.cs
index be40db7508..f0a6e4733c 100644
--- a/osu.Android/OsuGameActivity.cs
+++ b/osu.Android/OsuGameActivity.cs
@@ -5,15 +5,14 @@
using System;
using System.Collections.Generic;
-using System.IO;
using System.Linq;
+using System.Reflection;
using System.Threading.Tasks;
using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.Graphics;
using Android.OS;
-using Android.Provider;
using Android.Views;
using osu.Framework.Android;
using osu.Game.Database;
@@ -74,11 +73,23 @@ namespace osu.Android
Debug.Assert(Resources?.DisplayMetrics != null);
Point displaySize = new Point();
+#pragma warning disable 618 // GetSize is deprecated
WindowManager.DefaultDisplay.GetSize(displaySize);
+#pragma warning restore 618
float smallestWidthDp = Math.Min(displaySize.X, displaySize.Y) / Resources.DisplayMetrics.Density;
bool isTablet = smallestWidthDp >= 600f;
RequestedOrientation = DefaultOrientation = isTablet ? ScreenOrientation.FullUser : ScreenOrientation.SensorLandscape;
+
+ // Currently (SDK 6.0.200), BundleAssemblies is not runnable for net6-android.
+ // The assembly files are not available as files either after native AOT.
+ // Manually load them so that they can be loaded by RulesetStore.loadFromAppDomain.
+ // REMEMBER to fully uninstall previous version every time when investigating this!
+ // Don't forget osu.Game.Tests.Android too.
+ Assembly.Load("osu.Game.Rulesets.Osu");
+ Assembly.Load("osu.Game.Rulesets.Taiko");
+ Assembly.Load("osu.Game.Rulesets.Catch");
+ Assembly.Load("osu.Game.Rulesets.Mania");
}
protected override void OnNewIntent(Intent intent) => handleIntent(intent);
@@ -118,28 +129,14 @@ namespace osu.Android
await Task.WhenAll(uris.Select(async uri =>
{
- // there are more performant overloads of this method, but this one is the most backwards-compatible
- // (dates back to API 1).
- var cursor = ContentResolver?.Query(uri, null, null, null, null);
+ var task = await AndroidImportTask.Create(ContentResolver!, uri).ConfigureAwait(false);
- if (cursor == null)
- return;
-
- cursor.MoveToFirst();
-
- int filenameColumn = cursor.GetColumnIndex(OpenableColumns.DisplayName);
- string filename = cursor.GetString(filenameColumn);
-
- // SharpCompress requires archive streams to be seekable, which the stream opened by
- // OpenInputStream() seems to not necessarily be.
- // copy to an arbitrary-access memory stream to be able to proceed with the import.
- var copy = new MemoryStream();
- using (var stream = ContentResolver.OpenInputStream(uri))
- await stream.CopyToAsync(copy).ConfigureAwait(false);
-
- lock (tasks)
+ if (task != null)
{
- tasks.Add(new ImportTask(copy, filename));
+ lock (tasks)
+ {
+ tasks.Add(task);
+ }
}
})).ConfigureAwait(false);
diff --git a/osu.Android/OsuGameAndroid.cs b/osu.Android/OsuGameAndroid.cs
index 6b88f21bcd..0227d2aec2 100644
--- a/osu.Android/OsuGameAndroid.cs
+++ b/osu.Android/OsuGameAndroid.cs
@@ -5,7 +5,7 @@
using System;
using Android.App;
-using Android.OS;
+using Microsoft.Maui.Devices;
using osu.Framework.Allocation;
using osu.Framework.Android.Input;
using osu.Framework.Input.Handlers;
@@ -14,11 +14,10 @@ using osu.Game;
using osu.Game.Overlays.Settings;
using osu.Game.Updater;
using osu.Game.Utils;
-using Xamarin.Essentials;
namespace osu.Android
{
- public class OsuGameAndroid : OsuGame
+ public partial class OsuGameAndroid : OsuGame
{
[Cached]
private readonly OsuGameActivity gameActivity;
@@ -48,7 +47,7 @@ namespace osu.Android
// https://stackoverflow.com/questions/52977079/android-sdk-28-versioncode-in-packageinfo-has-been-deprecated
string versionName = string.Empty;
- if (Build.VERSION.SdkInt >= BuildVersionCodes.P)
+ if (OperatingSystem.IsAndroidVersionAtLeast(28))
{
versionName = packageInfo.LongVersionCode.ToString();
// ensure we only read the trailing portion of long (the part we are interested in).
diff --git a/osu.Android/Properties/AndroidManifestOverlay.xml b/osu.Android/Properties/AndroidManifestOverlay.xml
new file mode 100644
index 0000000000..815f935383
--- /dev/null
+++ b/osu.Android/Properties/AndroidManifestOverlay.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/osu.Android/osu.Android.csproj b/osu.Android/osu.Android.csproj
index 004cc8c39c..1507bfaa29 100644
--- a/osu.Android/osu.Android.csproj
+++ b/osu.Android/osu.Android.csproj
@@ -1,73 +1,22 @@
-
-
+
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {D1D5F9A8-B40B-40E6-B02F-482D03346D3D}
- {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- {122416d6-6b49-4ee2-a1e8-b825f31c79fe}
+ net6.0-android
+ Exeosu.Androidosu.Android
- Properties\AndroidManifest.xml
- armeabi-v7a;x86;arm64-v8a
- false
-
-
- cjk;mideast;other;rare;west
- d8
- r8
-
-
- None
- cjk;mideast;other;rare;west
- true
+ true
+
+ false
+ 0.0.0
+ 1
+ $(Version)
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
- {58f6c80c-1253-4a0e-a465-b8c85ebeadf3}
- osu.Game.Rulesets.Catch
-
-
- {48f4582b-7687-4621-9cbe-5c24197cb536}
- osu.Game.Rulesets.Mania
-
-
- {c92a607b-1fdd-4954-9f92-03ff547d9080}
- osu.Game.Rulesets.Osu
-
-
- {f167e17a-7de6-4af5-b920-a5112296c695}
- osu.Game.Rulesets.Taiko
-
-
- {2a66dd92-adb1-4994-89e2-c94e04acda0d}
- osu.Game
-
-
-
-
-
-
-
- 5.0.0
-
-
-
-
-
-
-
\ No newline at end of file
+
diff --git a/osu.Desktop/DiscordRichPresence.cs b/osu.Desktop/DiscordRichPresence.cs
index 9cf68d88d9..fe3e08537e 100644
--- a/osu.Desktop/DiscordRichPresence.cs
+++ b/osu.Desktop/DiscordRichPresence.cs
@@ -20,7 +20,7 @@ using LogLevel = osu.Framework.Logging.LogLevel;
namespace osu.Desktop
{
- internal class DiscordRichPresence : Component
+ internal partial class DiscordRichPresence : Component
{
private const string client_id = "367827983903490050";
@@ -98,7 +98,7 @@ namespace osu.Desktop
if (status.Value is UserStatusOnline && activity.Value != null)
{
- presence.State = truncate(activity.Value.Status);
+ presence.State = truncate(activity.Value.GetStatus(privacyMode.Value == DiscordRichPresenceMode.Limited));
presence.Details = truncate(getDetails(activity.Value));
if (getBeatmap(activity.Value) is IBeatmapInfo beatmap && beatmap.OnlineID > 0)
@@ -169,7 +169,7 @@ namespace osu.Desktop
case UserActivity.InGame game:
return game.BeatmapInfo;
- case UserActivity.Editing edit:
+ case UserActivity.EditingBeatmap edit:
return edit.BeatmapInfo;
}
@@ -183,9 +183,12 @@ namespace osu.Desktop
case UserActivity.InGame game:
return game.BeatmapInfo.ToString() ?? string.Empty;
- case UserActivity.Editing edit:
+ case UserActivity.EditingBeatmap edit:
return edit.BeatmapInfo.ToString() ?? string.Empty;
+ case UserActivity.WatchingReplay watching:
+ return watching.BeatmapInfo.ToString();
+
case UserActivity.InLobby lobby:
return privacyMode.Value == DiscordRichPresenceMode.Limited ? string.Empty : lobby.Room.Name.Value;
}
diff --git a/osu.Desktop/OsuGameDesktop.cs b/osu.Desktop/OsuGameDesktop.cs
index 3ee1b3da30..d92fea27bf 100644
--- a/osu.Desktop/OsuGameDesktop.cs
+++ b/osu.Desktop/OsuGameDesktop.cs
@@ -5,7 +5,6 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
-using System.Linq;
using System.Reflection;
using System.Runtime.Versioning;
using System.Threading.Tasks;
@@ -18,25 +17,18 @@ using osu.Framework;
using osu.Framework.Logging;
using osu.Game.Updater;
using osu.Desktop.Windows;
-using osu.Framework.Input.Handlers;
-using osu.Framework.Input.Handlers.Joystick;
-using osu.Framework.Input.Handlers.Mouse;
-using osu.Framework.Input.Handlers.Tablet;
-using osu.Framework.Input.Handlers.Touch;
using osu.Framework.Threading;
using osu.Game.IO;
using osu.Game.IPC;
-using osu.Game.Overlays.Settings;
-using osu.Game.Overlays.Settings.Sections;
-using osu.Game.Overlays.Settings.Sections.Input;
using osu.Game.Utils;
using SDL2;
namespace osu.Desktop
{
- internal class OsuGameDesktop : OsuGame
+ internal partial class OsuGameDesktop : OsuGame
{
private OsuSchemeLinkIPCChannel? osuSchemeLinkIPCChannel;
+ private ArchiveImportIPCChannel? archiveImportIPCChannel;
public OsuGameDesktop(string[]? args = null)
: base(args)
@@ -131,6 +123,7 @@ namespace osu.Desktop
LoadComponentAsync(new ElevatedPrivilegesChecker(), Add);
osuSchemeLinkIPCChannel = new OsuSchemeLinkIPCChannel(Host, this);
+ archiveImportIPCChannel = new ArchiveImportIPCChannel(Host, this);
}
public override void SetHost(GameHost host)
@@ -145,28 +138,17 @@ namespace osu.Desktop
desktopWindow.CursorState |= CursorState.Hidden;
desktopWindow.Title = Name;
- desktopWindow.DragDrop += f => fileDrop(new[] { f });
- }
-
- public override SettingsSubsection CreateSettingsSubsectionFor(InputHandler handler)
- {
- switch (handler)
+ desktopWindow.DragDrop += f =>
{
- case ITabletHandler th:
- return new TabletSettings(th);
+ // on macOS, URL associations are handled via SDL_DROPFILE events.
+ if (f.StartsWith(OSU_PROTOCOL, StringComparison.Ordinal))
+ {
+ HandleLink(f);
+ return;
+ }
- case MouseHandler mh:
- return new MouseSettings(mh);
-
- case JoystickHandler jh:
- return new JoystickSettings(jh);
-
- case TouchHandler th:
- return new InputSection.HandlerSection(th);
-
- default:
- return base.CreateSettingsSubsectionFor(handler);
- }
+ fileDrop(new[] { f });
+ };
}
protected override BatteryInfo CreateBatteryInfo() => new SDL2BatteryInfo();
@@ -178,10 +160,6 @@ namespace osu.Desktop
{
lock (importableFiles)
{
- string firstExtension = Path.GetExtension(filePaths.First());
-
- if (filePaths.Any(f => Path.GetExtension(f) != firstExtension)) return;
-
importableFiles.AddRange(filePaths);
Logger.Log($"Adding {filePaths.Length} files for import");
@@ -210,6 +188,7 @@ namespace osu.Desktop
{
base.Dispose(isDisposing);
osuSchemeLinkIPCChannel?.Dispose();
+ archiveImportIPCChannel?.Dispose();
}
private class SDL2BatteryInfo : BatteryInfo
diff --git a/osu.Desktop/Security/ElevatedPrivilegesChecker.cs b/osu.Desktop/Security/ElevatedPrivilegesChecker.cs
index cc4337fb02..6665733656 100644
--- a/osu.Desktop/Security/ElevatedPrivilegesChecker.cs
+++ b/osu.Desktop/Security/ElevatedPrivilegesChecker.cs
@@ -16,7 +16,7 @@ namespace osu.Desktop.Security
///
/// Checks if the game is running with elevated privileges (as admin in Windows, root in Unix) and displays a warning notification if so.
///
- public class ElevatedPrivilegesChecker : Component
+ public partial class ElevatedPrivilegesChecker : Component
{
[Resolved]
private INotificationOverlay notifications { get; set; } = null!;
@@ -63,7 +63,7 @@ namespace osu.Desktop.Security
return false;
}
- private class ElevatedPrivilegesNotification : SimpleNotification
+ private partial class ElevatedPrivilegesNotification : SimpleNotification
{
public override bool IsImportant => true;
diff --git a/osu.Desktop/Updater/SquirrelUpdateManager.cs b/osu.Desktop/Updater/SquirrelUpdateManager.cs
index 84bac9da7c..941ab335e8 100644
--- a/osu.Desktop/Updater/SquirrelUpdateManager.cs
+++ b/osu.Desktop/Updater/SquirrelUpdateManager.cs
@@ -9,6 +9,7 @@ using osu.Framework.Logging;
using osu.Game;
using osu.Game.Overlays;
using osu.Game.Overlays.Notifications;
+using osu.Game.Screens.Play;
using Squirrel;
using Squirrel.SimpleSplat;
using LogLevel = Squirrel.SimpleSplat.LogLevel;
@@ -17,7 +18,7 @@ using UpdateManager = osu.Game.Updater.UpdateManager;
namespace osu.Desktop.Updater
{
[SupportedOSPlatform("windows")]
- public class SquirrelUpdateManager : UpdateManager
+ public partial class SquirrelUpdateManager : UpdateManager
{
private Squirrel.UpdateManager? updateManager;
private INotificationOverlay notificationOverlay = null!;
@@ -36,6 +37,9 @@ namespace osu.Desktop.Updater
[Resolved]
private OsuGameBase game { get; set; } = null!;
+ [Resolved]
+ private ILocalUserPlayInfo? localUserInfo { get; set; }
+
[BackgroundDependencyLoader]
private void load(INotificationOverlay notifications)
{
@@ -55,6 +59,10 @@ namespace osu.Desktop.Updater
try
{
+ // Avoid any kind of update checking while gameplay is running.
+ if (localUserInfo?.IsPlaying.Value == true)
+ return false;
+
updateManager ??= new GithubUpdateManager(@"https://github.com/ppy/osu", false, github_token, @"osulazer");
var info = await updateManager.CheckForUpdate(!useDeltaPatching).ConfigureAwait(false);
diff --git a/osu.Desktop/Windows/GameplayWinKeyBlocker.cs b/osu.Desktop/Windows/GameplayWinKeyBlocker.cs
index 284d25306d..560f6fdd7f 100644
--- a/osu.Desktop/Windows/GameplayWinKeyBlocker.cs
+++ b/osu.Desktop/Windows/GameplayWinKeyBlocker.cs
@@ -10,7 +10,7 @@ using osu.Game.Screens.Play;
namespace osu.Desktop.Windows
{
- public class GameplayWinKeyBlocker : Component
+ public partial class GameplayWinKeyBlocker : Component
{
private Bindable disableWinKey = null!;
private IBindable localUserPlaying = null!;
diff --git a/osu.Desktop/osu.Desktop.csproj b/osu.Desktop/osu.Desktop.csproj
index 3f926ed45a..f1b9c92429 100644
--- a/osu.Desktop/osu.Desktop.csproj
+++ b/osu.Desktop/osu.Desktop.csproj
@@ -26,8 +26,8 @@
-
-
+
+
diff --git a/osu.Game.Benchmarks/BenchmarkCarouselFilter.cs b/osu.Game.Benchmarks/BenchmarkCarouselFilter.cs
new file mode 100644
index 0000000000..8f7027da17
--- /dev/null
+++ b/osu.Game.Benchmarks/BenchmarkCarouselFilter.cs
@@ -0,0 +1,123 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using BenchmarkDotNet.Attributes;
+using osu.Game.Beatmaps;
+using osu.Game.Rulesets;
+using osu.Game.Screens.Select;
+using osu.Game.Screens.Select.Carousel;
+
+namespace osu.Game.Benchmarks
+{
+ public class BenchmarkCarouselFilter : BenchmarkTest
+ {
+ private BeatmapInfo getExampleBeatmap() => new BeatmapInfo
+ {
+ Ruleset = new RulesetInfo
+ {
+ ShortName = "osu",
+ OnlineID = 0
+ },
+ StarRating = 4.0d,
+ Difficulty = new BeatmapDifficulty
+ {
+ ApproachRate = 5.0f,
+ DrainRate = 3.0f,
+ CircleSize = 2.0f,
+ },
+ Metadata = new BeatmapMetadata
+ {
+ Artist = "The Artist",
+ ArtistUnicode = "check unicode too",
+ Title = "Title goes here",
+ TitleUnicode = "Title goes here",
+ Author = { Username = "The Author" },
+ Source = "unit tests",
+ Tags = "look for tags too",
+ },
+ DifficultyName = "version as well",
+ Length = 2500,
+ BPM = 160,
+ BeatDivisor = 12,
+ Status = BeatmapOnlineStatus.Loved
+ };
+
+ private CarouselBeatmap carouselBeatmap = null!;
+ private FilterCriteria criteria1 = null!;
+ private FilterCriteria criteria2 = null!;
+ private FilterCriteria criteria3 = null!;
+ private FilterCriteria criteria4 = null!;
+ private FilterCriteria criteria5 = null!;
+ private FilterCriteria criteria6 = null!;
+
+ public override void SetUp()
+ {
+ var beatmap = getExampleBeatmap();
+ beatmap.OnlineID = 20201010;
+ beatmap.BeatmapSet = new BeatmapSetInfo { OnlineID = 1535 };
+ carouselBeatmap = new CarouselBeatmap(beatmap);
+ criteria1 = new FilterCriteria();
+ criteria2 = new FilterCriteria
+ {
+ Ruleset = new RulesetInfo { ShortName = "catch" }
+ };
+ criteria3 = new FilterCriteria
+ {
+ Ruleset = new RulesetInfo { OnlineID = 6 },
+ AllowConvertedBeatmaps = true,
+ BPM = new FilterCriteria.OptionalRange
+ {
+ IsUpperInclusive = false,
+ Max = 160d
+ }
+ };
+ criteria4 = new FilterCriteria
+ {
+ Ruleset = new RulesetInfo { OnlineID = 6 },
+ AllowConvertedBeatmaps = true,
+ SearchText = "an artist"
+ };
+ criteria5 = new FilterCriteria
+ {
+ Creator = new FilterCriteria.OptionalTextFilter { SearchTerm = "the author AND then something else" }
+ };
+ criteria6 = new FilterCriteria { SearchText = "20201010" };
+ }
+
+ [Benchmark]
+ public void CarouselBeatmapFilter()
+ {
+ carouselBeatmap.Filter(criteria1);
+ }
+
+ [Benchmark]
+ public void CriteriaMatchingSpecificRuleset()
+ {
+ carouselBeatmap.Filter(criteria2);
+ }
+
+ [Benchmark]
+ public void CriteriaMatchingRangeMax()
+ {
+ carouselBeatmap.Filter(criteria3);
+ }
+
+ [Benchmark]
+ public void CriteriaMatchingTerms()
+ {
+ carouselBeatmap.Filter(criteria4);
+ }
+
+ [Benchmark]
+ public void CriteriaMatchingCreator()
+ {
+ carouselBeatmap.Filter(criteria5);
+ }
+
+ [Benchmark]
+ public void CriteriaMatchingBeatmapIDs()
+ {
+ carouselBeatmap.Filter(criteria6);
+ }
+ }
+}
diff --git a/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj b/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj
index d62d422f33..4719d54138 100644
--- a/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj
+++ b/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj
@@ -7,9 +7,9 @@
-
+
-
+
diff --git a/osu.Game.Rulesets.Catch.Tests.Android/Properties/AndroidManifest.xml b/osu.Game.Rulesets.Catch.Tests.Android/AndroidManifest.xml
similarity index 98%
rename from osu.Game.Rulesets.Catch.Tests.Android/Properties/AndroidManifest.xml
rename to osu.Game.Rulesets.Catch.Tests.Android/AndroidManifest.xml
index f8c3fcd894..bf7c0bfeca 100644
--- a/osu.Game.Rulesets.Catch.Tests.Android/Properties/AndroidManifest.xml
+++ b/osu.Game.Rulesets.Catch.Tests.Android/AndroidManifest.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/osu.Game.Rulesets.Catch.Tests.Android/osu.Game.Rulesets.Catch.Tests.Android.csproj b/osu.Game.Rulesets.Catch.Tests.Android/osu.Game.Rulesets.Catch.Tests.Android.csproj
index 94fdba4a3e..4ee3219442 100644
--- a/osu.Game.Rulesets.Catch.Tests.Android/osu.Game.Rulesets.Catch.Tests.Android.csproj
+++ b/osu.Game.Rulesets.Catch.Tests.Android/osu.Game.Rulesets.Catch.Tests.Android.csproj
@@ -1,49 +1,24 @@
-
-
+
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {C5379ECB-3A94-4D2F-AC3B-2615AC23EB0D}
- {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- {122416d6-6b49-4ee2-a1e8-b825f31c79fe}
+ net6.0-android
+ Exeosu.Game.Rulesets.Catch.Testsosu.Game.Rulesets.Catch.Tests.Android
- Properties\AndroidManifest.xml
- armeabi-v7a;x86;arm64-v8a
-
-
- None
- cjk;mideast;other;rare;west
- true
-
-
-
-
-
-
-
+
%(RecursiveDir)%(Filename)%(Extension)
+
+
+ %(RecursiveDir)%(Filename)%(Extension)
+ Android\%(RecursiveDir)%(Filename)%(Extension)
+
-
- {58f6c80c-1253-4a0e-a465-b8c85ebeadf3}
- osu.Game.Rulesets.Catch
-
-
- {2A66DD92-ADB1-4994-89E2-C94E04ACDA0D}
- osu.Game
-
+
+
-
-
- 5.0.0
-
-
-
\ No newline at end of file
diff --git a/osu.Game.Rulesets.Catch.Tests.iOS/AppDelegate.cs b/osu.Game.Rulesets.Catch.Tests.iOS/AppDelegate.cs
deleted file mode 100644
index 64ff3f7151..0000000000
--- a/osu.Game.Rulesets.Catch.Tests.iOS/AppDelegate.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
-// See the LICENCE file in the repository root for full licence text.
-
-#nullable disable
-
-using Foundation;
-using osu.Framework.iOS;
-using osu.Game.Tests;
-
-namespace osu.Game.Rulesets.Catch.Tests.iOS
-{
- [Register("AppDelegate")]
- public class AppDelegate : GameAppDelegate
- {
- protected override Framework.Game CreateGame() => new OsuTestBrowser();
- }
-}
diff --git a/osu.Game.Rulesets.Catch.Tests.iOS/Application.cs b/osu.Game.Rulesets.Catch.Tests.iOS/Application.cs
index 71d943ece1..d097c6a698 100644
--- a/osu.Game.Rulesets.Catch.Tests.iOS/Application.cs
+++ b/osu.Game.Rulesets.Catch.Tests.iOS/Application.cs
@@ -1,10 +1,8 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.iOS;
-using UIKit;
+using osu.Game.Tests;
namespace osu.Game.Rulesets.Catch.Tests.iOS
{
@@ -12,7 +10,7 @@ namespace osu.Game.Rulesets.Catch.Tests.iOS
{
public static void Main(string[] args)
{
- UIApplication.Main(args, typeof(GameUIApplication), typeof(AppDelegate));
+ GameApplication.Main(new OsuTestBrowser());
}
}
}
diff --git a/osu.Game.Rulesets.Catch.Tests.iOS/Info.plist b/osu.Game.Rulesets.Catch.Tests.iOS/Info.plist
index 16a2b99997..5ace6c07f5 100644
--- a/osu.Game.Rulesets.Catch.Tests.iOS/Info.plist
+++ b/osu.Game.Rulesets.Catch.Tests.iOS/Info.plist
@@ -13,7 +13,7 @@
LSRequiresIPhoneOSMinimumOSVersion
- 10.0
+ 13.4UIDeviceFamily1
diff --git a/osu.Game.Rulesets.Catch.Tests.iOS/osu.Game.Rulesets.Catch.Tests.iOS.csproj b/osu.Game.Rulesets.Catch.Tests.iOS/osu.Game.Rulesets.Catch.Tests.iOS.csproj
index be6044bbd0..acf12bb0ac 100644
--- a/osu.Game.Rulesets.Catch.Tests.iOS/osu.Game.Rulesets.Catch.Tests.iOS.csproj
+++ b/osu.Game.Rulesets.Catch.Tests.iOS/osu.Game.Rulesets.Catch.Tests.iOS.csproj
@@ -1,35 +1,19 @@
-
-
+
- Debug
- iPhoneSimulator
- {4004C7B7-1A62-43F1-9DF2-52450FA67E70}Exe
+ net6.0-ios
+ 13.4osu.Game.Rulesets.Catch.Testsosu.Game.Rulesets.Catch.Tests.iOS
-
-
-
- Linker.xml
-
-
-
%(RecursiveDir)%(Filename)%(Extension)
-
- {2A66DD92-ADB1-4994-89E2-C94E04ACDA0D}
- osu.Game
-
-
- {58F6C80C-1253-4A0E-A465-B8C85EBEADF3}
- osu.Game.Rulesets.Catch
-
+
+
-
-
\ No newline at end of file
+
diff --git a/osu.Game.Rulesets.Catch.Tests/CatchSkinnableTestScene.cs b/osu.Game.Rulesets.Catch.Tests/CatchSkinnableTestScene.cs
index be6622f06e..2af851a561 100644
--- a/osu.Game.Rulesets.Catch.Tests/CatchSkinnableTestScene.cs
+++ b/osu.Game.Rulesets.Catch.Tests/CatchSkinnableTestScene.cs
@@ -7,7 +7,7 @@ using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Catch.Tests
{
- public abstract class CatchSkinnableTestScene : SkinnableTestScene
+ public abstract partial class CatchSkinnableTestScene : SkinnableTestScene
{
protected override Ruleset CreateRulesetForSkinProvider() => new CatchRuleset();
}
diff --git a/osu.Game.Rulesets.Catch.Tests/Editor/CatchEditorTestSceneContainer.cs b/osu.Game.Rulesets.Catch.Tests/Editor/CatchEditorTestSceneContainer.cs
index 78f56b4937..39508359a4 100644
--- a/osu.Game.Rulesets.Catch.Tests/Editor/CatchEditorTestSceneContainer.cs
+++ b/osu.Game.Rulesets.Catch.Tests/Editor/CatchEditorTestSceneContainer.cs
@@ -16,7 +16,7 @@ using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Catch.Tests.Editor
{
- public class CatchEditorTestSceneContainer : Container
+ public partial class CatchEditorTestSceneContainer : Container
{
[Cached(typeof(Playfield))]
public readonly ScrollingPlayfield Playfield;
@@ -57,7 +57,7 @@ namespace osu.Game.Rulesets.Catch.Tests.Editor
};
}
- private class TestCatchPlayfield : CatchEditorPlayfield
+ private partial class TestCatchPlayfield : CatchEditorPlayfield
{
public TestCatchPlayfield()
: base(new BeatmapDifficulty { CircleSize = 0 })
diff --git a/osu.Game.Rulesets.Catch.Tests/Editor/CatchPlacementBlueprintTestScene.cs b/osu.Game.Rulesets.Catch.Tests/Editor/CatchPlacementBlueprintTestScene.cs
index 9060fa5aa0..aae759d934 100644
--- a/osu.Game.Rulesets.Catch.Tests/Editor/CatchPlacementBlueprintTestScene.cs
+++ b/osu.Game.Rulesets.Catch.Tests/Editor/CatchPlacementBlueprintTestScene.cs
@@ -21,7 +21,7 @@ using osuTK.Input;
namespace osu.Game.Rulesets.Catch.Tests.Editor
{
- public abstract class CatchPlacementBlueprintTestScene : PlacementBlueprintTestScene
+ public abstract partial class CatchPlacementBlueprintTestScene : PlacementBlueprintTestScene
{
protected const double TIME_SNAP = 100;
diff --git a/osu.Game.Rulesets.Catch.Tests/Editor/CatchSelectionBlueprintTestScene.cs b/osu.Game.Rulesets.Catch.Tests/Editor/CatchSelectionBlueprintTestScene.cs
index 60fb31d1e0..033dca587e 100644
--- a/osu.Game.Rulesets.Catch.Tests/Editor/CatchSelectionBlueprintTestScene.cs
+++ b/osu.Game.Rulesets.Catch.Tests/Editor/CatchSelectionBlueprintTestScene.cs
@@ -17,7 +17,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Tests.Editor
{
- public abstract class CatchSelectionBlueprintTestScene : SelectionBlueprintTestScene
+ public abstract partial class CatchSelectionBlueprintTestScene : SelectionBlueprintTestScene
{
protected ScrollingHitObjectContainer HitObjectContainer => contentContainer.Playfield.HitObjectContainer;
@@ -62,7 +62,7 @@ namespace osu.Game.Rulesets.Catch.Tests.Editor
InputManager.MoveMouseTo(pos);
});
- private class EditorBeatmapDependencyContainer : Container
+ private partial class EditorBeatmapDependencyContainer : Container
{
[Cached]
private readonly EditorClock editorClock;
diff --git a/osu.Game.Rulesets.Catch.Tests/Editor/Checks/TestCheckBananaShowerGap.cs b/osu.Game.Rulesets.Catch.Tests/Editor/Checks/TestCheckBananaShowerGap.cs
index 16361d12c6..ef34a5d664 100644
--- a/osu.Game.Rulesets.Catch.Tests/Editor/Checks/TestCheckBananaShowerGap.cs
+++ b/osu.Game.Rulesets.Catch.Tests/Editor/Checks/TestCheckBananaShowerGap.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
@@ -18,7 +16,7 @@ namespace osu.Game.Rulesets.Catch.Tests.Editor.Checks
[TestFixture]
public class TestCheckBananaShowerGap
{
- private CheckBananaShowerGap check;
+ private CheckBananaShowerGap check = null!;
[SetUp]
public void Setup()
diff --git a/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneBananaShowerPlacementBlueprint.cs b/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneBananaShowerPlacementBlueprint.cs
index d08acc90cd..2db4102513 100644
--- a/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneBananaShowerPlacementBlueprint.cs
+++ b/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneBananaShowerPlacementBlueprint.cs
@@ -20,7 +20,7 @@ using osuTK.Input;
namespace osu.Game.Rulesets.Catch.Tests.Editor
{
- public class TestSceneBananaShowerPlacementBlueprint : CatchPlacementBlueprintTestScene
+ public partial class TestSceneBananaShowerPlacementBlueprint : CatchPlacementBlueprintTestScene
{
protected override DrawableHitObject CreateHitObject(HitObject hitObject) => new DrawableBananaShower((BananaShower)hitObject);
diff --git a/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneCatchDistanceSnapGrid.cs b/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneCatchDistanceSnapGrid.cs
index 405bab971c..1e057cf3fb 100644
--- a/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneCatchDistanceSnapGrid.cs
+++ b/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneCatchDistanceSnapGrid.cs
@@ -20,7 +20,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Tests.Editor
{
- public class TestSceneCatchDistanceSnapGrid : OsuManualInputManagerTestScene
+ public partial class TestSceneCatchDistanceSnapGrid : OsuManualInputManagerTestScene
{
private readonly ManualClock manualClock = new ManualClock();
diff --git a/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneEditor.cs b/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneEditor.cs
index 9ecfd5f5c5..5593f3d319 100644
--- a/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneEditor.cs
+++ b/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneEditor.cs
@@ -9,7 +9,7 @@ using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Catch.Tests.Editor
{
[TestFixture]
- public class TestSceneEditor : EditorTestScene
+ public partial class TestSceneEditor : EditorTestScene
{
protected override Ruleset CreateEditorRuleset() => new CatchRuleset();
}
diff --git a/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneFruitPlacementBlueprint.cs b/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneFruitPlacementBlueprint.cs
index 94574b564d..93b24d92fb 100644
--- a/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneFruitPlacementBlueprint.cs
+++ b/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneFruitPlacementBlueprint.cs
@@ -17,7 +17,7 @@ using osuTK.Input;
namespace osu.Game.Rulesets.Catch.Tests.Editor
{
- public class TestSceneFruitPlacementBlueprint : CatchPlacementBlueprintTestScene
+ public partial class TestSceneFruitPlacementBlueprint : CatchPlacementBlueprintTestScene
{
protected override DrawableHitObject CreateHitObject(HitObject hitObject) => new DrawableFruit((Fruit)hitObject);
diff --git a/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneJuiceStreamPlacementBlueprint.cs b/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneJuiceStreamPlacementBlueprint.cs
index 691ebc7efc..2426f8c886 100644
--- a/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneJuiceStreamPlacementBlueprint.cs
+++ b/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneJuiceStreamPlacementBlueprint.cs
@@ -19,7 +19,7 @@ using osuTK.Input;
namespace osu.Game.Rulesets.Catch.Tests.Editor
{
- public class TestSceneJuiceStreamPlacementBlueprint : CatchPlacementBlueprintTestScene
+ public partial class TestSceneJuiceStreamPlacementBlueprint : CatchPlacementBlueprintTestScene
{
private const double velocity_factor = 0.5;
@@ -45,7 +45,7 @@ namespace osu.Game.Rulesets.Catch.Tests.Editor
AddAssert("end time is correct", () => Precision.AlmostEquals(lastObject.EndTime, times[1]));
AddAssert("start position is correct", () => Precision.AlmostEquals(lastObject.OriginalX, positions[0]));
AddAssert("end position is correct", () => Precision.AlmostEquals(lastObject.EndX, positions[1]));
- AddAssert("default slider velocity", () => lastObject.DifficultyControlPoint.SliderVelocityBindable.IsDefault);
+ AddAssert("default slider velocity", () => lastObject.SliderVelocityBindable.IsDefault);
}
[Test]
@@ -76,7 +76,7 @@ namespace osu.Game.Rulesets.Catch.Tests.Editor
addPlacementSteps(times, positions);
addPathCheckStep(times, positions);
- AddAssert("slider velocity changed", () => !lastObject.DifficultyControlPoint.SliderVelocityBindable.IsDefault);
+ AddAssert("slider velocity changed", () => !lastObject.SliderVelocityBindable.IsDefault);
}
[Test]
diff --git a/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneJuiceStreamSelectionBlueprint.cs b/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneJuiceStreamSelectionBlueprint.cs
index 8635a88d79..beba5811fe 100644
--- a/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneJuiceStreamSelectionBlueprint.cs
+++ b/osu.Game.Rulesets.Catch.Tests/Editor/TestSceneJuiceStreamSelectionBlueprint.cs
@@ -19,7 +19,7 @@ using osuTK.Input;
namespace osu.Game.Rulesets.Catch.Tests.Editor
{
- public class TestSceneJuiceStreamSelectionBlueprint : CatchSelectionBlueprintTestScene
+ public partial class TestSceneJuiceStreamSelectionBlueprint : CatchSelectionBlueprintTestScene
{
private JuiceStream hitObject;
@@ -108,11 +108,11 @@ namespace osu.Game.Rulesets.Catch.Tests.Editor
double[] times = { 100, 300 };
float[] positions = { 200, 300 };
addBlueprintStep(times, positions);
- AddAssert("default slider velocity", () => hitObject.DifficultyControlPoint.SliderVelocityBindable.IsDefault);
+ AddAssert("default slider velocity", () => hitObject.SliderVelocityBindable.IsDefault);
addDragStartStep(times[1], positions[1]);
AddMouseMoveStep(times[1], 400);
- AddAssert("slider velocity changed", () => !hitObject.DifficultyControlPoint.SliderVelocityBindable.IsDefault);
+ AddAssert("slider velocity changed", () => !hitObject.SliderVelocityBindable.IsDefault);
}
[Test]
diff --git a/osu.Game.Rulesets.Catch.Tests/Mods/TestSceneCatchModFlashlight.cs b/osu.Game.Rulesets.Catch.Tests/Mods/TestSceneCatchModFlashlight.cs
index 538fc7fac6..f89ed5ce8e 100644
--- a/osu.Game.Rulesets.Catch.Tests/Mods/TestSceneCatchModFlashlight.cs
+++ b/osu.Game.Rulesets.Catch.Tests/Mods/TestSceneCatchModFlashlight.cs
@@ -7,7 +7,7 @@ using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Catch.Tests.Mods
{
- public class TestSceneCatchModFlashlight : ModTestScene
+ public partial class TestSceneCatchModFlashlight : ModTestScene
{
protected override Ruleset CreatePlayerRuleset() => new CatchRuleset();
diff --git a/osu.Game.Rulesets.Catch.Tests/Mods/TestSceneCatchModNoScope.cs b/osu.Game.Rulesets.Catch.Tests/Mods/TestSceneCatchModNoScope.cs
index bbe543e73e..c48bf7adc9 100644
--- a/osu.Game.Rulesets.Catch.Tests/Mods/TestSceneCatchModNoScope.cs
+++ b/osu.Game.Rulesets.Catch.Tests/Mods/TestSceneCatchModNoScope.cs
@@ -14,10 +14,40 @@ using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Catch.Tests.Mods
{
- public class TestSceneCatchModNoScope : ModTestScene
+ public partial class TestSceneCatchModNoScope : ModTestScene
{
protected override Ruleset CreatePlayerRuleset() => new CatchRuleset();
+ [Test]
+ public void TestAlwaysHidden()
+ {
+ CreateModTest(new ModTestData
+ {
+ Mod = new CatchModNoScope
+ {
+ HiddenComboCount = { Value = 0 },
+ },
+ Autoplay = true,
+ PassCondition = () => Player.ScoreProcessor.Combo.Value == 2,
+ Beatmap = new Beatmap
+ {
+ HitObjects = new List
+ {
+ new Fruit
+ {
+ X = CatchPlayfield.CENTER_X * 0.5f,
+ StartTime = 1000,
+ },
+ new Fruit
+ {
+ X = CatchPlayfield.CENTER_X * 1.5f,
+ StartTime = 2000,
+ }
+ }
+ }
+ });
+ }
+
[Test]
public void TestVisibleDuringBreak()
{
diff --git a/osu.Game.Rulesets.Catch.Tests/Mods/TestSceneCatchModPerfect.cs b/osu.Game.Rulesets.Catch.Tests/Mods/TestSceneCatchModPerfect.cs
index 3e06e78dba..71df523951 100644
--- a/osu.Game.Rulesets.Catch.Tests/Mods/TestSceneCatchModPerfect.cs
+++ b/osu.Game.Rulesets.Catch.Tests/Mods/TestSceneCatchModPerfect.cs
@@ -11,7 +11,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Tests.Mods
{
- public class TestSceneCatchModPerfect : ModPerfectTestScene
+ public partial class TestSceneCatchModPerfect : ModPerfectTestScene
{
protected override Ruleset CreatePlayerRuleset() => new CatchRuleset();
diff --git a/osu.Game.Rulesets.Catch.Tests/Mods/TestSceneCatchModRelax.cs b/osu.Game.Rulesets.Catch.Tests/Mods/TestSceneCatchModRelax.cs
index c01aff0aa0..5835ccaf78 100644
--- a/osu.Game.Rulesets.Catch.Tests/Mods/TestSceneCatchModRelax.cs
+++ b/osu.Game.Rulesets.Catch.Tests/Mods/TestSceneCatchModRelax.cs
@@ -4,8 +4,10 @@
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
+using osu.Framework.Graphics.Containers;
using osu.Framework.Testing;
using osu.Game.Beatmaps;
+using osu.Game.Graphics.Cursor;
using osu.Game.Rulesets.Catch.Mods;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Catch.UI;
@@ -16,7 +18,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Tests.Mods
{
- public class TestSceneCatchModRelax : ModTestScene
+ public partial class TestSceneCatchModRelax : ModTestScene
{
protected override Ruleset CreatePlayerRuleset() => new CatchRuleset();
@@ -55,6 +57,21 @@ namespace osu.Game.Rulesets.Catch.Tests.Mods
}
});
+ [Test]
+ public void TestGameCursorHidden()
+ {
+ CreateModTest(new ModTestData
+ {
+ Mod = new CatchModRelax(),
+ Autoplay = false,
+ PassCondition = () =>
+ {
+ InputManager.MoveMouseTo(this.ChildrenOfType().Single());
+ return this.ChildrenOfType().Single().State.Value == Visibility.Hidden;
+ }
+ });
+ }
+
private bool passCondition()
{
var playfield = this.ChildrenOfType().Single();
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneAutoJuiceStream.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneAutoJuiceStream.cs
index e47a687f24..f21825668f 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneAutoJuiceStream.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneAutoJuiceStream.cs
@@ -16,7 +16,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Tests
{
- public class TestSceneAutoJuiceStream : TestSceneCatchPlayer
+ public partial class TestSceneAutoJuiceStream : TestSceneCatchPlayer
{
protected override IBeatmap CreateBeatmap(RulesetInfo ruleset)
{
@@ -45,7 +45,7 @@ namespace osu.Game.Rulesets.Catch.Tests
NewCombo = i % 8 == 0,
Samples = new List(new[]
{
- new HitSampleInfo(HitSampleInfo.HIT_NORMAL, HitSampleInfo.BANK_NORMAL, volume: 100)
+ new HitSampleInfo(HitSampleInfo.HIT_NORMAL)
})
});
}
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneBananaShower.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneBananaShower.cs
index 0ddc58eb25..402f8f548d 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneBananaShower.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneBananaShower.cs
@@ -10,7 +10,7 @@ using osu.Game.Rulesets.Catch.Objects;
namespace osu.Game.Rulesets.Catch.Tests
{
[TestFixture]
- public class TestSceneBananaShower : TestSceneCatchPlayer
+ public partial class TestSceneBananaShower : TestSceneCatchPlayer
{
[Test]
public void TestBananaShower()
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneCatchModHidden.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchModHidden.cs
index 7e1c39f6a8..05d3361dc3 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneCatchModHidden.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchModHidden.cs
@@ -19,7 +19,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Tests
{
- public class TestSceneCatchModHidden : ModTestScene
+ public partial class TestSceneCatchModHidden : ModTestScene
{
[Test]
public void TestJuiceStream()
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneCatchPlayer.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchPlayer.cs
index 16942f3f35..01cce88d9d 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneCatchPlayer.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchPlayer.cs
@@ -9,7 +9,7 @@ using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Catch.Tests
{
[TestFixture]
- public class TestSceneCatchPlayer : PlayerTestScene
+ public partial class TestSceneCatchPlayer : PlayerTestScene
{
protected override Ruleset CreatePlayerRuleset() => new CatchRuleset();
}
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneCatchPlayerLegacySkin.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchPlayerLegacySkin.cs
index 2078e1453f..4c1ba33aa2 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneCatchPlayerLegacySkin.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchPlayerLegacySkin.cs
@@ -16,7 +16,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Tests
{
[TestFixture]
- public class TestSceneCatchPlayerLegacySkin : LegacySkinPlayerTestScene
+ public partial class TestSceneCatchPlayerLegacySkin : LegacySkinPlayerTestScene
{
protected override Ruleset CreatePlayerRuleset() => new CatchRuleset();
@@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Catch.Tests
if (withModifiedSkin)
{
AddStep("change component scale", () => Player.ChildrenOfType().First().Scale = new Vector2(2f));
- AddStep("update target", () => Player.ChildrenOfType().ForEach(LegacySkin.UpdateDrawableTarget));
+ AddStep("update target", () => Player.ChildrenOfType().ForEach(LegacySkin.UpdateDrawableTarget));
AddStep("exit player", () => Player.Exit());
CreateTest();
}
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneCatchReplay.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchReplay.cs
index 6e12dacf29..cbf900ebc0 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneCatchReplay.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchReplay.cs
@@ -11,7 +11,7 @@ using osu.Game.Rulesets.Catch.UI;
namespace osu.Game.Rulesets.Catch.Tests
{
- public class TestSceneCatchReplay : TestSceneCatchPlayer
+ public partial class TestSceneCatchReplay : TestSceneCatchPlayer
{
protected override bool Autoplay => true;
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneCatchSkinConfiguration.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchSkinConfiguration.cs
index a4b2b26624..75ab4ad9d2 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneCatchSkinConfiguration.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchSkinConfiguration.cs
@@ -23,7 +23,7 @@ using Direction = osu.Game.Rulesets.Catch.UI.Direction;
namespace osu.Game.Rulesets.Catch.Tests
{
- public class TestSceneCatchSkinConfiguration : OsuTestScene
+ public partial class TestSceneCatchSkinConfiguration : OsuTestScene
{
private Catcher catcher;
@@ -92,7 +92,7 @@ namespace osu.Game.Rulesets.Catch.Tests
public bool FlipCatcherPlate { get; set; }
public TestSkin()
- : base(null)
+ : base(null!)
{
}
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneCatchStacker.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchStacker.cs
index 1405e0018d..c8979381fe 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneCatchStacker.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchStacker.cs
@@ -11,7 +11,7 @@ using osu.Game.Rulesets.Catch.UI;
namespace osu.Game.Rulesets.Catch.Tests
{
[TestFixture]
- public class TestSceneCatchStacker : TestSceneCatchPlayer
+ public partial class TestSceneCatchStacker : TestSceneCatchPlayer
{
protected override IBeatmap CreateBeatmap(RulesetInfo ruleset)
{
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneCatchTouchInput.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchTouchInput.cs
index cf6a8169c4..836adcc912 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneCatchTouchInput.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchTouchInput.cs
@@ -15,7 +15,7 @@ using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Catch.Tests
{
[TestFixture]
- public class TestSceneCatchTouchInput : OsuTestScene
+ public partial class TestSceneCatchTouchInput : OsuTestScene
{
[Test]
public void TestBasic()
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneCatcher.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneCatcher.cs
index 2dc99077d3..f60ae29f77 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneCatcher.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneCatcher.cs
@@ -27,7 +27,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Tests
{
[TestFixture]
- public class TestSceneCatcher : OsuTestScene
+ public partial class TestSceneCatcher : OsuTestScene
{
[Resolved]
private OsuConfigManager config { get; set; }
@@ -60,26 +60,24 @@ namespace osu.Game.Rulesets.Catch.Tests
[Test]
public void TestCatcherHyperStateReverted()
{
- DrawableCatchHitObject drawableObject1 = null;
- DrawableCatchHitObject drawableObject2 = null;
JudgementResult result1 = null;
JudgementResult result2 = null;
AddStep("catch hyper fruit", () =>
{
- attemptCatch(new Fruit { HyperDashTarget = new Fruit { X = 100 } }, out drawableObject1, out result1);
+ result1 = attemptCatch(new Fruit { HyperDashTarget = new Fruit { X = 100 } });
});
AddStep("catch normal fruit", () =>
{
- attemptCatch(new Fruit(), out drawableObject2, out result2);
+ result2 = attemptCatch(new Fruit());
});
AddStep("revert second result", () =>
{
- catcher.OnRevertResult(drawableObject2, result2);
+ catcher.OnRevertResult(result2);
});
checkHyperDash(true);
AddStep("revert first result", () =>
{
- catcher.OnRevertResult(drawableObject1, result1);
+ catcher.OnRevertResult(result1);
});
checkHyperDash(false);
}
@@ -87,16 +85,15 @@ namespace osu.Game.Rulesets.Catch.Tests
[Test]
public void TestCatcherAnimationStateReverted()
{
- DrawableCatchHitObject drawableObject = null;
JudgementResult result = null;
AddStep("catch kiai fruit", () =>
{
- attemptCatch(new TestKiaiFruit(), out drawableObject, out result);
+ result = attemptCatch(new TestKiaiFruit());
});
checkState(CatcherAnimationState.Kiai);
AddStep("revert result", () =>
{
- catcher.OnRevertResult(drawableObject, result);
+ catcher.OnRevertResult(result);
});
checkState(CatcherAnimationState.Idle);
}
@@ -268,23 +265,19 @@ namespace osu.Game.Rulesets.Catch.Tests
private void checkHyperDash(bool state) => AddAssert($"catcher is {(state ? "" : "not ")}hyper dashing", () => catcher.HyperDashing == state);
- private void attemptCatch(CatchHitObject hitObject)
- {
- attemptCatch(() => hitObject, 1);
- }
-
private void attemptCatch(Func hitObject, int count)
{
for (int i = 0; i < count; i++)
- attemptCatch(hitObject(), out _, out _);
+ attemptCatch(hitObject());
}
- private void attemptCatch(CatchHitObject hitObject, out DrawableCatchHitObject drawableObject, out JudgementResult result)
+ private JudgementResult attemptCatch(CatchHitObject hitObject)
{
hitObject.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
- drawableObject = createDrawableObject(hitObject);
- result = createResult(hitObject);
+ var drawableObject = createDrawableObject(hitObject);
+ var result = createResult(hitObject);
applyResult(drawableObject, result);
+ return result;
}
private void applyResult(DrawableCatchHitObject drawableObject, JudgementResult result)
@@ -324,7 +317,7 @@ namespace osu.Game.Rulesets.Catch.Tests
}
}
- public class TestCatcher : Catcher
+ public partial class TestCatcher : Catcher
{
public IEnumerable CaughtObjects => this.ChildrenOfType();
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneCatcherArea.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneCatcherArea.cs
index 150c1f8406..99c2fc570d 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneCatcherArea.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneCatcherArea.cs
@@ -23,7 +23,7 @@ using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Catch.Tests
{
[TestFixture]
- public class TestSceneCatcherArea : CatchSkinnableTestScene
+ public partial class TestSceneCatcherArea : CatchSkinnableTestScene
{
private RulesetInfo catchRuleset;
@@ -120,7 +120,7 @@ namespace osu.Game.Rulesets.Catch.Tests
catchRuleset = rulesets.GetRuleset(2);
}
- private class TestCatcherArea : CatcherArea
+ private partial class TestCatcherArea : CatcherArea
{
public TestCatcherArea(IBeatmapDifficultyInfo beatmapDifficulty)
{
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneComboCounter.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneComboCounter.cs
index f3161f32be..391297a252 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneComboCounter.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneComboCounter.cs
@@ -19,7 +19,7 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.Catch.Tests
{
- public class TestSceneComboCounter : CatchSkinnableTestScene
+ public partial class TestSceneComboCounter : CatchSkinnableTestScene
{
private ScoreProcessor scoreProcessor = null!;
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneDrawableHitObjects.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneDrawableHitObjects.cs
index 94c870a444..11d6419507 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneDrawableHitObjects.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneDrawableHitObjects.cs
@@ -21,7 +21,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Tests
{
- public class TestSceneDrawableHitObjects : OsuTestScene
+ public partial class TestSceneDrawableHitObjects : OsuTestScene
{
private DrawableCatchRuleset drawableRuleset;
private double playfieldTime => drawableRuleset.Playfield.Time.Current;
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneDrawableHitObjectsHidden.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneDrawableHitObjectsHidden.cs
index 868f498e8c..007f309f3f 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneDrawableHitObjectsHidden.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneDrawableHitObjectsHidden.cs
@@ -8,7 +8,7 @@ using osu.Game.Rulesets.Catch.Mods;
namespace osu.Game.Rulesets.Catch.Tests
{
- public class TestSceneDrawableHitObjectsHidden : TestSceneDrawableHitObjects
+ public partial class TestSceneDrawableHitObjectsHidden : TestSceneDrawableHitObjects
{
[SetUp]
public void SetUp() => Schedule(() =>
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneFruitObjects.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneFruitObjects.cs
index 7d72633e34..223c4e57fc 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneFruitObjects.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneFruitObjects.cs
@@ -15,7 +15,7 @@ using osu.Game.Rulesets.Catch.Objects.Drawables;
namespace osu.Game.Rulesets.Catch.Tests
{
[TestFixture]
- public class TestSceneFruitObjects : CatchSkinnableTestScene
+ public partial class TestSceneFruitObjects : CatchSkinnableTestScene
{
protected override void LoadComplete()
{
@@ -58,7 +58,7 @@ namespace osu.Game.Rulesets.Catch.Tests
private Drawable createDrawableTinyDroplet() => new TestDrawableCatchHitObjectSpecimen(new DrawableTinyDroplet(new TinyDroplet()));
}
- public class TestDrawableCatchHitObjectSpecimen : CompositeDrawable
+ public partial class TestDrawableCatchHitObjectSpecimen : CompositeDrawable
{
public readonly ManualClock ManualClock;
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneFruitRandomness.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneFruitRandomness.cs
index c7d130b440..995daaceb1 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneFruitRandomness.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneFruitRandomness.cs
@@ -12,7 +12,7 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.Catch.Tests
{
- public class TestSceneFruitRandomness : OsuTestScene
+ public partial class TestSceneFruitRandomness : OsuTestScene
{
private readonly DrawableFruit drawableFruit;
private readonly DrawableBanana drawableBanana;
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneFruitVisualChange.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneFruitVisualChange.cs
index f7abd8d519..4b2873e0a8 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneFruitVisualChange.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneFruitVisualChange.cs
@@ -9,7 +9,7 @@ using osu.Game.Rulesets.Catch.Objects.Drawables;
namespace osu.Game.Rulesets.Catch.Tests
{
- public class TestSceneFruitVisualChange : TestSceneFruitObjects
+ public partial class TestSceneFruitVisualChange : TestSceneFruitObjects
{
private readonly Bindable indexInBeatmap = new Bindable();
private readonly Bindable hyperDash = new Bindable();
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneHyperDash.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneHyperDash.cs
index 4886942dc6..f8c43a221e 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneHyperDash.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneHyperDash.cs
@@ -17,7 +17,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Tests
{
[TestFixture]
- public class TestSceneHyperDash : TestSceneCatchPlayer
+ public partial class TestSceneHyperDash : TestSceneCatchPlayer
{
protected override bool Autoplay => true;
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneHyperDashColouring.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneHyperDashColouring.cs
index cf49b7fe12..b343174e6b 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneHyperDashColouring.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneHyperDashColouring.cs
@@ -24,7 +24,7 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.Catch.Tests
{
- public class TestSceneHyperDashColouring : OsuTestScene
+ public partial class TestSceneHyperDashColouring : OsuTestScene
{
[Resolved]
private SkinManager skins { get; set; }
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneJuiceStream.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneJuiceStream.cs
index 81589459c4..c91f07891c 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneJuiceStream.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneJuiceStream.cs
@@ -14,7 +14,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Tests
{
- public class TestSceneJuiceStream : TestSceneCatchPlayer
+ public partial class TestSceneJuiceStream : TestSceneCatchPlayer
{
[Test]
public void TestJuiceStreamEndingCombo()
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneLegacyBeatmapSkin.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneLegacyBeatmapSkin.cs
index 786353bb00..aa66fc8741 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneLegacyBeatmapSkin.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneLegacyBeatmapSkin.cs
@@ -18,7 +18,7 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.Catch.Tests
{
- public class TestSceneLegacyBeatmapSkin : LegacyBeatmapSkinColourTest
+ public partial class TestSceneLegacyBeatmapSkin : LegacyBeatmapSkinColourTest
{
[Resolved]
private AudioManager audio { get; set; }
@@ -105,7 +105,7 @@ namespace osu.Game.Rulesets.Catch.Tests
protected override ExposedPlayer CreateTestPlayer(bool userHasCustomColours) => new CatchExposedPlayer(userHasCustomColours);
- private class CatchExposedPlayer : ExposedPlayer
+ private partial class CatchExposedPlayer : ExposedPlayer
{
public CatchExposedPlayer(bool userHasCustomColours)
: base(userHasCustomColours)
diff --git a/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj b/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj
index c9db824615..01922b2a96 100644
--- a/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj
+++ b/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj
@@ -1,9 +1,9 @@
-
+
-
+ WinExe
diff --git a/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmap.cs b/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmap.cs
index ac39b91f00..f009c10a9c 100644
--- a/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmap.cs
+++ b/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmap.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System.Collections.Generic;
using System.Linq;
using osu.Game.Beatmaps;
diff --git a/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapConverter.cs b/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapConverter.cs
index 9f5d007114..2c8ef9eae0 100644
--- a/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapConverter.cs
+++ b/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapConverter.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
using System.Collections.Generic;
@@ -28,6 +26,7 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
var xPositionData = obj as IHasXPosition;
var yPositionData = obj as IHasYPosition;
var comboData = obj as IHasCombo;
+ var sliderVelocityData = obj as IHasSliderVelocity;
switch (obj)
{
@@ -43,7 +42,8 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
NewCombo = comboData?.NewCombo ?? false,
ComboOffset = comboData?.ComboOffset ?? 0,
LegacyLastTickOffset = (obj as IHasLegacyLastTickOffset)?.LegacyLastTickOffset ?? 0,
- LegacyConvertedY = yPositionData?.Y ?? CatchHitObject.DEFAULT_LEGACY_CONVERT_Y
+ LegacyConvertedY = yPositionData?.Y ?? CatchHitObject.DEFAULT_LEGACY_CONVERT_Y,
+ SliderVelocity = sliderVelocityData?.SliderVelocity ?? 1
}.Yield();
case IHasDuration endTime:
diff --git a/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapProcessor.cs b/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapProcessor.cs
index 835f7c2d27..ab61b14ac4 100644
--- a/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapProcessor.cs
+++ b/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapProcessor.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/osu.Game.Rulesets.Catch/CatchInputManager.cs b/osu.Game.Rulesets.Catch/CatchInputManager.cs
index 5b62154a34..1ef9e55d2d 100644
--- a/osu.Game.Rulesets.Catch/CatchInputManager.cs
+++ b/osu.Game.Rulesets.Catch/CatchInputManager.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System.ComponentModel;
using osu.Framework.Allocation;
using osu.Framework.Input.Bindings;
@@ -11,7 +9,7 @@ using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.Catch
{
[Cached]
- public class CatchInputManager : RulesetInputManager
+ public partial class CatchInputManager : RulesetInputManager
{
public CatchInputManager(RulesetInfo ruleset)
: base(ruleset, 0, SimultaneousBindingMode.Unique)
diff --git a/osu.Game.Rulesets.Catch/CatchRuleset.cs b/osu.Game.Rulesets.Catch/CatchRuleset.cs
index 5c9c95827a..8a0b8250d5 100644
--- a/osu.Game.Rulesets.Catch/CatchRuleset.cs
+++ b/osu.Game.Rulesets.Catch/CatchRuleset.cs
@@ -17,6 +17,7 @@ using osu.Game.Rulesets.Catch.Edit;
using osu.Game.Rulesets.Catch.Mods;
using osu.Game.Rulesets.Catch.Replays;
using osu.Game.Rulesets.Catch.Scoring;
+using osu.Game.Rulesets.Catch.Skinning.Argon;
using osu.Game.Rulesets.Catch.Skinning.Legacy;
using osu.Game.Rulesets.Catch.UI;
using osu.Game.Rulesets.Difficulty;
@@ -112,6 +113,7 @@ namespace osu.Game.Rulesets.Catch
new MultiMod(new CatchModDoubleTime(), new CatchModNightcore()),
new CatchModHidden(),
new CatchModFlashlight(),
+ new ModAccuracyChallenge(),
};
case ModType.Conversion:
@@ -188,6 +190,9 @@ namespace osu.Game.Rulesets.Catch
{
case LegacySkin:
return new CatchLegacySkinTransformer(skin);
+
+ case ArgonSkin:
+ return new CatchArgonSkinTransformer(skin);
}
return null;
diff --git a/osu.Game.Rulesets.Catch/CatchSkinComponent.cs b/osu.Game.Rulesets.Catch/CatchSkinComponentLookup.cs
similarity index 73%
rename from osu.Game.Rulesets.Catch/CatchSkinComponent.cs
rename to osu.Game.Rulesets.Catch/CatchSkinComponentLookup.cs
index e79da667da..149aae1cb4 100644
--- a/osu.Game.Rulesets.Catch/CatchSkinComponent.cs
+++ b/osu.Game.Rulesets.Catch/CatchSkinComponentLookup.cs
@@ -1,15 +1,13 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Game.Skinning;
namespace osu.Game.Rulesets.Catch
{
- public class CatchSkinComponent : GameplaySkinComponent
+ public class CatchSkinComponentLookup : GameplaySkinComponentLookup
{
- public CatchSkinComponent(CatchSkinComponents component)
+ public CatchSkinComponentLookup(CatchSkinComponents component)
: base(component)
{
}
diff --git a/osu.Game.Rulesets.Catch/CatchSkinComponents.cs b/osu.Game.Rulesets.Catch/CatchSkinComponents.cs
index 7587de5803..371e901c69 100644
--- a/osu.Game.Rulesets.Catch/CatchSkinComponents.cs
+++ b/osu.Game.Rulesets.Catch/CatchSkinComponents.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
namespace osu.Game.Rulesets.Catch
{
public enum CatchSkinComponents
diff --git a/osu.Game.Rulesets.Catch/Difficulty/CatchDifficultyCalculator.cs b/osu.Game.Rulesets.Catch/Difficulty/CatchDifficultyCalculator.cs
index f37479f84a..42cfde268e 100644
--- a/osu.Game.Rulesets.Catch/Difficulty/CatchDifficultyCalculator.cs
+++ b/osu.Game.Rulesets.Catch/Difficulty/CatchDifficultyCalculator.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
@@ -51,7 +49,7 @@ namespace osu.Game.Rulesets.Catch.Difficulty
protected override IEnumerable CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate)
{
- CatchHitObject lastObject = null;
+ CatchHitObject? lastObject = null;
List objects = new List();
diff --git a/osu.Game.Rulesets.Catch/Difficulty/CatchPerformanceAttributes.cs b/osu.Game.Rulesets.Catch/Difficulty/CatchPerformanceAttributes.cs
index ccdfd30200..1335fc2d23 100644
--- a/osu.Game.Rulesets.Catch/Difficulty/CatchPerformanceAttributes.cs
+++ b/osu.Game.Rulesets.Catch/Difficulty/CatchPerformanceAttributes.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Game.Rulesets.Difficulty;
namespace osu.Game.Rulesets.Catch.Difficulty
diff --git a/osu.Game.Rulesets.Catch/Difficulty/CatchPerformanceCalculator.cs b/osu.Game.Rulesets.Catch/Difficulty/CatchPerformanceCalculator.cs
index 2a07b8019e..b30b85be2d 100644
--- a/osu.Game.Rulesets.Catch/Difficulty/CatchPerformanceCalculator.cs
+++ b/osu.Game.Rulesets.Catch/Difficulty/CatchPerformanceCalculator.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/osu.Game.Rulesets.Catch/Difficulty/Preprocessing/CatchDifficultyHitObject.cs b/osu.Game.Rulesets.Catch/Difficulty/Preprocessing/CatchDifficultyHitObject.cs
index c44480776f..3bcfce3a56 100644
--- a/osu.Game.Rulesets.Catch/Difficulty/Preprocessing/CatchDifficultyHitObject.cs
+++ b/osu.Game.Rulesets.Catch/Difficulty/Preprocessing/CatchDifficultyHitObject.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System;
using System.Collections.Generic;
using osu.Game.Rulesets.Catch.Objects;
diff --git a/osu.Game.Rulesets.Catch/Difficulty/Skills/Movement.cs b/osu.Game.Rulesets.Catch/Difficulty/Skills/Movement.cs
index 827c28f7de..cfb3fe40be 100644
--- a/osu.Game.Rulesets.Catch/Difficulty/Skills/Movement.cs
+++ b/osu.Game.Rulesets.Catch/Difficulty/Skills/Movement.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System;
using osu.Game.Rulesets.Catch.Difficulty.Preprocessing;
using osu.Game.Rulesets.Difficulty.Preprocessing;
diff --git a/osu.Game.Rulesets.Catch/Edit/BananaShowerCompositionTool.cs b/osu.Game.Rulesets.Catch/Edit/BananaShowerCompositionTool.cs
index e64a51f03a..31075db7d1 100644
--- a/osu.Game.Rulesets.Catch/Edit/BananaShowerCompositionTool.cs
+++ b/osu.Game.Rulesets.Catch/Edit/BananaShowerCompositionTool.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Graphics;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Edit.Blueprints;
diff --git a/osu.Game.Rulesets.Catch/Edit/Blueprints/BananaShowerPlacementBlueprint.cs b/osu.Game.Rulesets.Catch/Edit/Blueprints/BananaShowerPlacementBlueprint.cs
index 86fdf09a72..1e63d32c41 100644
--- a/osu.Game.Rulesets.Catch/Edit/Blueprints/BananaShowerPlacementBlueprint.cs
+++ b/osu.Game.Rulesets.Catch/Edit/Blueprints/BananaShowerPlacementBlueprint.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Catch.Edit.Blueprints.Components;
@@ -12,13 +10,15 @@ using osuTK.Input;
namespace osu.Game.Rulesets.Catch.Edit.Blueprints
{
- public class BananaShowerPlacementBlueprint : CatchPlacementBlueprint
+ public partial class BananaShowerPlacementBlueprint : CatchPlacementBlueprint
{
private readonly TimeSpanOutline outline;
private double placementStartTime;
private double placementEndTime;
+ protected override bool IsValidForPlacement => HitObject.Duration > 0;
+
public BananaShowerPlacementBlueprint()
{
InternalChild = outline = new TimeSpanOutline();
@@ -51,7 +51,7 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints
case PlacementState.Active:
if (e.Button != MouseButton.Right) break;
- EndPlacement(HitObject.Duration > 0);
+ EndPlacement(true);
return true;
}
diff --git a/osu.Game.Rulesets.Catch/Edit/Blueprints/BananaShowerSelectionBlueprint.cs b/osu.Game.Rulesets.Catch/Edit/Blueprints/BananaShowerSelectionBlueprint.cs
index 7e4aca180c..f6dd67889e 100644
--- a/osu.Game.Rulesets.Catch/Edit/Blueprints/BananaShowerSelectionBlueprint.cs
+++ b/osu.Game.Rulesets.Catch/Edit/Blueprints/BananaShowerSelectionBlueprint.cs
@@ -1,13 +1,11 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Game.Rulesets.Catch.Objects;
namespace osu.Game.Rulesets.Catch.Edit.Blueprints
{
- public class BananaShowerSelectionBlueprint : CatchSelectionBlueprint
+ public partial class BananaShowerSelectionBlueprint : CatchSelectionBlueprint
{
public BananaShowerSelectionBlueprint(BananaShower hitObject)
: base(hitObject)
diff --git a/osu.Game.Rulesets.Catch/Edit/Blueprints/CatchPlacementBlueprint.cs b/osu.Game.Rulesets.Catch/Edit/Blueprints/CatchPlacementBlueprint.cs
index 8a1ced7eea..d2d605a6fe 100644
--- a/osu.Game.Rulesets.Catch/Edit/Blueprints/CatchPlacementBlueprint.cs
+++ b/osu.Game.Rulesets.Catch/Edit/Blueprints/CatchPlacementBlueprint.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Allocation;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Edit;
@@ -12,7 +10,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Edit.Blueprints
{
- public class CatchPlacementBlueprint : PlacementBlueprint
+ public partial class CatchPlacementBlueprint : PlacementBlueprint
where THitObject : CatchHitObject, new()
{
protected new THitObject HitObject => (THitObject)base.HitObject;
@@ -20,7 +18,7 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints
protected ScrollingHitObjectContainer HitObjectContainer => (ScrollingHitObjectContainer)playfield.HitObjectContainer;
[Resolved]
- private Playfield playfield { get; set; }
+ private Playfield playfield { get; set; } = null!;
public CatchPlacementBlueprint()
: base(new THitObject())
diff --git a/osu.Game.Rulesets.Catch/Edit/Blueprints/CatchSelectionBlueprint.cs b/osu.Game.Rulesets.Catch/Edit/Blueprints/CatchSelectionBlueprint.cs
index e7c04cd132..8220fb88b4 100644
--- a/osu.Game.Rulesets.Catch/Edit/Blueprints/CatchSelectionBlueprint.cs
+++ b/osu.Game.Rulesets.Catch/Edit/Blueprints/CatchSelectionBlueprint.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Allocation;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Edit;
@@ -12,7 +10,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Edit.Blueprints
{
- public abstract class CatchSelectionBlueprint : HitObjectSelectionBlueprint
+ public abstract partial class CatchSelectionBlueprint : HitObjectSelectionBlueprint
where THitObject : CatchHitObject
{
protected override bool AlwaysShowWhenSelected => true;
@@ -31,7 +29,7 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints
protected ScrollingHitObjectContainer HitObjectContainer => (ScrollingHitObjectContainer)playfield.HitObjectContainer;
[Resolved]
- private Playfield playfield { get; set; }
+ private Playfield playfield { get; set; } = null!;
protected CatchSelectionBlueprint(THitObject hitObject)
: base(hitObject)
diff --git a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/EditablePath.cs b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/EditablePath.cs
index 8473eda663..7a577f8a83 100644
--- a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/EditablePath.cs
+++ b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/EditablePath.cs
@@ -1,13 +1,10 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
-using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@@ -20,7 +17,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
{
- public abstract class EditablePath : CompositeDrawable
+ public abstract partial class EditablePath : CompositeDrawable
{
public int PathId => path.InvalidationID;
@@ -42,9 +39,8 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
private readonly List previousVertexStates = new List();
- [Resolved(CanBeNull = true)]
- [CanBeNull]
- private IBeatSnapProvider beatSnapProvider { get; set; }
+ [Resolved]
+ private IBeatSnapProvider? beatSnapProvider { get; set; }
protected EditablePath(Func positionToTime)
{
@@ -95,7 +91,7 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
public void UpdateHitObjectFromPath(JuiceStream hitObject)
{
// The SV setting may need to be changed for the current path.
- var svBindable = hitObject.DifficultyControlPoint.SliderVelocityBindable;
+ var svBindable = hitObject.SliderVelocityBindable;
double svToVelocityFactor = hitObject.Velocity / svBindable.Value;
double requiredVelocity = path.ComputeRequiredVelocity();
diff --git a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/FruitOutline.cs b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/FruitOutline.cs
index 86006a99fc..c7805544ea 100644
--- a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/FruitOutline.cs
+++ b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/FruitOutline.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@@ -13,7 +11,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
{
- public class FruitOutline : CompositeDrawable
+ public partial class FruitOutline : CompositeDrawable
{
public FruitOutline()
{
diff --git a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/NestedOutlineContainer.cs b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/NestedOutlineContainer.cs
index a6f1732bc1..c1f46539fa 100644
--- a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/NestedOutlineContainer.cs
+++ b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/NestedOutlineContainer.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Graphics;
@@ -13,7 +11,7 @@ using osu.Game.Rulesets.UI.Scrolling;
namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
{
- public class NestedOutlineContainer : CompositeDrawable
+ public partial class NestedOutlineContainer : CompositeDrawable
{
private readonly List nestedHitObjects = new List();
diff --git a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/PlacementEditablePath.cs b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/PlacementEditablePath.cs
index 27df064be4..3a7d6d87f2 100644
--- a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/PlacementEditablePath.cs
+++ b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/PlacementEditablePath.cs
@@ -1,15 +1,13 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System;
using osu.Game.Rulesets.Catch.Objects;
using osuTK;
namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
{
- public class PlacementEditablePath : EditablePath
+ public partial class PlacementEditablePath : EditablePath
{
///
/// The original position of the last added vertex.
diff --git a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/ScrollingPath.cs b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/ScrollingPath.cs
index 3a62b07816..a22abcb76d 100644
--- a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/ScrollingPath.cs
+++ b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/ScrollingPath.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Graphics;
@@ -15,7 +13,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
{
- public class ScrollingPath : CompositeDrawable
+ public partial class ScrollingPath : CompositeDrawable
{
private readonly Path drawablePath;
diff --git a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/SelectionEditablePath.cs b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/SelectionEditablePath.cs
index 4576e9f8ee..c7a26ca15a 100644
--- a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/SelectionEditablePath.cs
+++ b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/SelectionEditablePath.cs
@@ -1,12 +1,9 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
-using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.UserInterface;
@@ -18,16 +15,15 @@ using osuTK.Input;
namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
{
- public class SelectionEditablePath : EditablePath, IHasContextMenu
+ public partial class SelectionEditablePath : EditablePath, IHasContextMenu
{
public MenuItem[] ContextMenuItems => getContextMenuItems().ToArray();
// To handle when the editor is scrolled while dragging.
private Vector2 dragStartPosition;
- [Resolved(CanBeNull = true)]
- [CanBeNull]
- private IEditorChangeHandler changeHandler { get; set; }
+ [Resolved]
+ private IEditorChangeHandler? changeHandler { get; set; }
public SelectionEditablePath(Func positionToTime)
: base(positionToTime)
diff --git a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/TimeSpanOutline.cs b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/TimeSpanOutline.cs
index 2586a81ef5..9d450cd355 100644
--- a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/TimeSpanOutline.cs
+++ b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/TimeSpanOutline.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
@@ -15,7 +13,7 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
{
- public class TimeSpanOutline : CompositeDrawable
+ public partial class TimeSpanOutline : CompositeDrawable
{
private const float border_width = 4;
diff --git a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/VertexPiece.cs b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/VertexPiece.cs
index 236d27753a..07d7c72698 100644
--- a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/VertexPiece.cs
+++ b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/VertexPiece.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
@@ -12,10 +10,10 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
{
- public class VertexPiece : Circle
+ public partial class VertexPiece : Circle
{
[Resolved]
- private OsuColour osuColour { get; set; }
+ private OsuColour osuColour { get; set; } = null!;
public VertexPiece()
{
diff --git a/osu.Game.Rulesets.Catch/Edit/Blueprints/FruitPlacementBlueprint.cs b/osu.Game.Rulesets.Catch/Edit/Blueprints/FruitPlacementBlueprint.cs
index 686840ae55..72592891fb 100644
--- a/osu.Game.Rulesets.Catch/Edit/Blueprints/FruitPlacementBlueprint.cs
+++ b/osu.Game.Rulesets.Catch/Edit/Blueprints/FruitPlacementBlueprint.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Catch.Edit.Blueprints.Components;
using osu.Game.Rulesets.Catch.Objects;
@@ -11,7 +9,7 @@ using osuTK.Input;
namespace osu.Game.Rulesets.Catch.Edit.Blueprints
{
- public class FruitPlacementBlueprint : CatchPlacementBlueprint
+ public partial class FruitPlacementBlueprint : CatchPlacementBlueprint
{
private readonly FruitOutline outline;
diff --git a/osu.Game.Rulesets.Catch/Edit/Blueprints/FruitSelectionBlueprint.cs b/osu.Game.Rulesets.Catch/Edit/Blueprints/FruitSelectionBlueprint.cs
index b5a25dbf62..2737b283ef 100644
--- a/osu.Game.Rulesets.Catch/Edit/Blueprints/FruitSelectionBlueprint.cs
+++ b/osu.Game.Rulesets.Catch/Edit/Blueprints/FruitSelectionBlueprint.cs
@@ -1,14 +1,12 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Game.Rulesets.Catch.Edit.Blueprints.Components;
using osu.Game.Rulesets.Catch.Objects;
namespace osu.Game.Rulesets.Catch.Edit.Blueprints
{
- public class FruitSelectionBlueprint : CatchSelectionBlueprint
+ public partial class FruitSelectionBlueprint : CatchSelectionBlueprint
{
private readonly FruitOutline outline;
diff --git a/osu.Game.Rulesets.Catch/Edit/Blueprints/JuiceStreamPlacementBlueprint.cs b/osu.Game.Rulesets.Catch/Edit/Blueprints/JuiceStreamPlacementBlueprint.cs
index fcdd055b56..9e50b5a80f 100644
--- a/osu.Game.Rulesets.Catch/Edit/Blueprints/JuiceStreamPlacementBlueprint.cs
+++ b/osu.Game.Rulesets.Catch/Edit/Blueprints/JuiceStreamPlacementBlueprint.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Graphics;
using osu.Framework.Input;
using osu.Framework.Input.Events;
@@ -14,7 +12,7 @@ using osuTK.Input;
namespace osu.Game.Rulesets.Catch.Edit.Blueprints
{
- public class JuiceStreamPlacementBlueprint : CatchPlacementBlueprint
+ public partial class JuiceStreamPlacementBlueprint : CatchPlacementBlueprint
{
private readonly ScrollingPath scrollingPath;
@@ -24,7 +22,9 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints
private int lastEditablePathId = -1;
- private InputManager inputManager;
+ private InputManager inputManager = null!;
+
+ protected override bool IsValidForPlacement => HitObject.Duration > 0;
public JuiceStreamPlacementBlueprint()
{
@@ -72,7 +72,7 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints
return true;
case MouseButton.Right:
- EndPlacement(HitObject.Duration > 0);
+ EndPlacement(true);
return true;
}
diff --git a/osu.Game.Rulesets.Catch/Edit/Blueprints/JuiceStreamSelectionBlueprint.cs b/osu.Game.Rulesets.Catch/Edit/Blueprints/JuiceStreamSelectionBlueprint.cs
index fc2b5e08fe..49d778ad08 100644
--- a/osu.Game.Rulesets.Catch/Edit/Blueprints/JuiceStreamSelectionBlueprint.cs
+++ b/osu.Game.Rulesets.Catch/Edit/Blueprints/JuiceStreamSelectionBlueprint.cs
@@ -1,11 +1,8 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System.Collections.Generic;
using System.Linq;
-using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Caching;
using osu.Framework.Graphics;
@@ -22,7 +19,7 @@ using osuTK.Input;
namespace osu.Game.Rulesets.Catch.Edit.Blueprints
{
- public class JuiceStreamSelectionBlueprint : CatchSelectionBlueprint
+ public partial class JuiceStreamSelectionBlueprint : CatchSelectionBlueprint
{
public override Quad SelectionQuad => HitObjectContainer.ToScreenSpace(getBoundingBox().Offset(new Vector2(0, HitObjectContainer.DrawHeight)));
@@ -53,9 +50,8 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints
private Vector2 rightMouseDownPosition;
- [Resolved(CanBeNull = true)]
- [CanBeNull]
- private EditorBeatmap editorBeatmap { get; set; }
+ [Resolved]
+ private EditorBeatmap? editorBeatmap { get; set; }
public JuiceStreamSelectionBlueprint(JuiceStream hitObject)
: base(hitObject)
diff --git a/osu.Game.Rulesets.Catch/Edit/CatchBeatmapVerifier.cs b/osu.Game.Rulesets.Catch/Edit/CatchBeatmapVerifier.cs
index 6570a19a92..c7a41a4e22 100644
--- a/osu.Game.Rulesets.Catch/Edit/CatchBeatmapVerifier.cs
+++ b/osu.Game.Rulesets.Catch/Edit/CatchBeatmapVerifier.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System.Collections.Generic;
using System.Linq;
using osu.Game.Rulesets.Catch.Edit.Checks;
diff --git a/osu.Game.Rulesets.Catch/Edit/CatchBlueprintContainer.cs b/osu.Game.Rulesets.Catch/Edit/CatchBlueprintContainer.cs
index a0a11424d0..3979d30616 100644
--- a/osu.Game.Rulesets.Catch/Edit/CatchBlueprintContainer.cs
+++ b/osu.Game.Rulesets.Catch/Edit/CatchBlueprintContainer.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Game.Rulesets.Catch.Edit.Blueprints;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Edit;
@@ -11,7 +9,7 @@ using osu.Game.Screens.Edit.Compose.Components;
namespace osu.Game.Rulesets.Catch.Edit
{
- public class CatchBlueprintContainer : ComposeBlueprintContainer
+ public partial class CatchBlueprintContainer : ComposeBlueprintContainer
{
public CatchBlueprintContainer(CatchHitObjectComposer composer)
: base(composer)
@@ -20,7 +18,7 @@ namespace osu.Game.Rulesets.Catch.Edit
protected override SelectionHandler CreateSelectionHandler() => new CatchSelectionHandler();
- public override HitObjectSelectionBlueprint CreateHitObjectBlueprintFor(HitObject hitObject)
+ public override HitObjectSelectionBlueprint? CreateHitObjectBlueprintFor(HitObject hitObject)
{
switch (hitObject)
{
diff --git a/osu.Game.Rulesets.Catch/Edit/CatchDistanceSnapGrid.cs b/osu.Game.Rulesets.Catch/Edit/CatchDistanceSnapGrid.cs
index 718c76abfc..cf6ddc66ed 100644
--- a/osu.Game.Rulesets.Catch/Edit/CatchDistanceSnapGrid.cs
+++ b/osu.Game.Rulesets.Catch/Edit/CatchDistanceSnapGrid.cs
@@ -1,12 +1,9 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
-using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@@ -24,7 +21,7 @@ namespace osu.Game.Rulesets.Catch.Edit
/// The guide lines used in the osu!catch editor to compose patterns that can be caught with constant speed.
/// Currently, only forward placement (an object is snapped based on the previous object, not the opposite) is supported.
///
- public class CatchDistanceSnapGrid : CompositeDrawable
+ public partial class CatchDistanceSnapGrid : CompositeDrawable
{
public double StartTime { get; set; }
@@ -39,7 +36,7 @@ namespace osu.Game.Rulesets.Catch.Edit
private readonly List verticalLineVertices = new List();
[Resolved]
- private Playfield playfield { get; set; }
+ private Playfield playfield { get; set; } = null!;
private ScrollingHitObjectContainer hitObjectContainer => (ScrollingHitObjectContainer)playfield.HitObjectContainer;
@@ -106,8 +103,7 @@ namespace osu.Game.Rulesets.Catch.Edit
}
}
- [CanBeNull]
- public SnapResult GetSnappedPosition(Vector2 screenSpacePosition)
+ public SnapResult? GetSnappedPosition(Vector2 screenSpacePosition)
{
double time = hitObjectContainer.TimeAtScreenSpacePosition(screenSpacePosition);
@@ -121,9 +117,7 @@ namespace osu.Game.Rulesets.Catch.Edit
return new SnapResult(originPosition, StartTime);
}
- return enumerateSnappingCandidates(time)
- .OrderBy(pos => Vector2.DistanceSquared(screenSpacePosition, pos.ScreenSpacePosition))
- .FirstOrDefault();
+ return enumerateSnappingCandidates(time).MinBy(pos => Vector2.DistanceSquared(screenSpacePosition, pos.ScreenSpacePosition));
}
private IEnumerable enumerateSnappingCandidates(double time)
diff --git a/osu.Game.Rulesets.Catch/Edit/CatchEditorPlayfield.cs b/osu.Game.Rulesets.Catch/Edit/CatchEditorPlayfield.cs
index b9a875fe8a..c9481c2757 100644
--- a/osu.Game.Rulesets.Catch/Edit/CatchEditorPlayfield.cs
+++ b/osu.Game.Rulesets.Catch/Edit/CatchEditorPlayfield.cs
@@ -1,14 +1,12 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.UI;
namespace osu.Game.Rulesets.Catch.Edit
{
- public class CatchEditorPlayfield : CatchPlayfield
+ public partial class CatchEditorPlayfield : CatchPlayfield
{
// TODO fixme: the size of the catcher is not changed when circle size is changed in setup screen.
public CatchEditorPlayfield(IBeatmapDifficultyInfo difficulty)
diff --git a/osu.Game.Rulesets.Catch/Edit/CatchEditorPlayfieldAdjustmentContainer.cs b/osu.Game.Rulesets.Catch/Edit/CatchEditorPlayfieldAdjustmentContainer.cs
index 0a0f91c781..0271005dd1 100644
--- a/osu.Game.Rulesets.Catch/Edit/CatchEditorPlayfieldAdjustmentContainer.cs
+++ b/osu.Game.Rulesets.Catch/Edit/CatchEditorPlayfieldAdjustmentContainer.cs
@@ -10,7 +10,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Edit
{
- public class CatchEditorPlayfieldAdjustmentContainer : PlayfieldAdjustmentContainer
+ public partial class CatchEditorPlayfieldAdjustmentContainer : PlayfieldAdjustmentContainer
{
protected override Container Content => content;
private readonly Container content;
@@ -29,7 +29,7 @@ namespace osu.Game.Rulesets.Catch.Edit
};
}
- private class ScalingContainer : Container
+ private partial class ScalingContainer : Container
{
public ScalingContainer()
{
diff --git a/osu.Game.Rulesets.Catch/Edit/CatchHitObjectComposer.cs b/osu.Game.Rulesets.Catch/Edit/CatchHitObjectComposer.cs
index 54d50b01c4..cd8894753f 100644
--- a/osu.Game.Rulesets.Catch/Edit/CatchHitObjectComposer.cs
+++ b/osu.Game.Rulesets.Catch/Edit/CatchHitObjectComposer.cs
@@ -1,16 +1,13 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
+using System;
using System.Collections.Generic;
using System.Linq;
-using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Extensions.EnumExtensions;
using osu.Framework.Graphics;
-using osu.Framework.Graphics.Sprites;
using osu.Framework.Input;
using osu.Framework.Input.Events;
using osu.Game.Beatmaps;
@@ -23,21 +20,18 @@ using osu.Game.Rulesets.Edit.Tools;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.UI;
-using osu.Game.Screens.Edit.Components.TernaryButtons;
using osu.Game.Screens.Edit.Compose.Components;
using osuTK;
namespace osu.Game.Rulesets.Catch.Edit
{
- public class CatchHitObjectComposer : DistancedHitObjectComposer
+ public partial class CatchHitObjectComposer : DistancedHitObjectComposer
{
private const float distance_snap_radius = 50;
- private CatchDistanceSnapGrid distanceSnapGrid;
+ private CatchDistanceSnapGrid distanceSnapGrid = null!;
- private readonly Bindable distanceSnapToggle = new Bindable();
-
- private InputManager inputManager;
+ private InputManager inputManager = null!;
private readonly BindableDouble timeRangeMultiplier = new BindableDouble(1)
{
@@ -54,7 +48,6 @@ namespace osu.Game.Rulesets.Catch.Edit
private void load()
{
// todo: enable distance spacing once catch supports applying it to its existing distance snap grid implementation.
- RightSideToolboxContainer.Alpha = 0;
DistanceSpacingMultiplier.Disabled = true;
LayerBelowRuleset.Add(new PlayfieldBorder
@@ -81,6 +74,19 @@ namespace osu.Game.Rulesets.Catch.Edit
inputManager = GetContainingInputManager();
}
+ protected override double ReadCurrentDistanceSnap(HitObject before, HitObject after)
+ {
+ // osu!catch's distance snap implementation is limited, in that a custom spacing cannot be specified.
+ // Therefore this functionality is not currently used.
+ //
+ // The implementation below is probably correct but should be checked if/when exposed via controls.
+
+ float expectedDistance = DurationToDistance(before, after.StartTime - before.GetEndTime());
+ float actualDistance = Math.Abs(((CatchHitObject)before).EffectiveX - ((CatchHitObject)after).EffectiveX);
+
+ return actualDistance / expectedDistance;
+ }
+
protected override void Update()
{
base.Update();
@@ -107,7 +113,7 @@ namespace osu.Game.Rulesets.Catch.Edit
return base.OnPressed(e);
}
- protected override DrawableRuleset CreateDrawableRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnlyList mods = null) =>
+ protected override DrawableRuleset CreateDrawableRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnlyList? mods = null) =>
new DrawableCatchEditorRuleset(ruleset, beatmap, mods)
{
TimeRangeMultiplier = { BindTarget = timeRangeMultiplier, }
@@ -120,11 +126,6 @@ namespace osu.Game.Rulesets.Catch.Edit
new BananaShowerCompositionTool()
};
- protected override IEnumerable CreateTernaryButtons() => base.CreateTernaryButtons().Concat(new[]
- {
- new TernaryButton(distanceSnapToggle, "Distance Snap", () => new SpriteIcon { Icon = FontAwesome.Solid.Ruler })
- });
-
public override SnapResult FindSnappedPositionAndTime(Vector2 screenSpacePosition, SnapType snapType = SnapType.All)
{
var result = base.FindSnappedPositionAndTime(screenSpacePosition, snapType);
@@ -145,8 +146,7 @@ namespace osu.Game.Rulesets.Catch.Edit
protected override ComposeBlueprintContainer CreateBlueprintContainer() => new CatchBlueprintContainer(this);
- [CanBeNull]
- private PalpableCatchHitObject getLastSnappableHitObject(double time)
+ private PalpableCatchHitObject? getLastSnappableHitObject(double time)
{
var hitObject = EditorBeatmap.HitObjects.OfType().LastOrDefault(h => h.GetEndTime() < time && !(h is BananaShower));
@@ -163,8 +163,7 @@ namespace osu.Game.Rulesets.Catch.Edit
}
}
- [CanBeNull]
- private PalpableCatchHitObject getDistanceSnapGridSourceHitObject()
+ private PalpableCatchHitObject? getDistanceSnapGridSourceHitObject()
{
switch (BlueprintContainer.CurrentTool)
{
@@ -183,7 +182,8 @@ namespace osu.Game.Rulesets.Catch.Edit
if (EditorBeatmap.PlacementObject.Value is JuiceStream)
{
// Juice stream path is not subject to snapping.
- return null;
+ if (BlueprintContainer.CurrentPlacement.PlacementActive is PlacementBlueprint.PlacementState.Active)
+ return null;
}
double timeAtCursor = ((CatchPlayfield)Playfield).TimeAtScreenSpacePosition(inputManager.CurrentState.Mouse.Position);
@@ -196,7 +196,7 @@ namespace osu.Game.Rulesets.Catch.Edit
private void updateDistanceSnapGrid()
{
- if (distanceSnapToggle.Value != TernaryState.True)
+ if (DistanceSnapToggle.Value != TernaryState.True)
{
distanceSnapGrid.Hide();
return;
diff --git a/osu.Game.Rulesets.Catch/Edit/CatchHitObjectUtils.cs b/osu.Game.Rulesets.Catch/Edit/CatchHitObjectUtils.cs
index 889d3909bd..bd33080109 100644
--- a/osu.Game.Rulesets.Catch/Edit/CatchHitObjectUtils.cs
+++ b/osu.Game.Rulesets.Catch/Edit/CatchHitObjectUtils.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System.Collections.Generic;
using System.Linq;
using osu.Game.Rulesets.Catch.Objects;
diff --git a/osu.Game.Rulesets.Catch/Edit/CatchSelectionHandler.cs b/osu.Game.Rulesets.Catch/Edit/CatchSelectionHandler.cs
index 5aac521d0b..418351e2f3 100644
--- a/osu.Game.Rulesets.Catch/Edit/CatchSelectionHandler.cs
+++ b/osu.Game.Rulesets.Catch/Edit/CatchSelectionHandler.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
@@ -18,12 +16,12 @@ using Direction = osu.Framework.Graphics.Direction;
namespace osu.Game.Rulesets.Catch.Edit
{
- public class CatchSelectionHandler : EditorSelectionHandler
+ public partial class CatchSelectionHandler : EditorSelectionHandler
{
protected ScrollingHitObjectContainer HitObjectContainer => (ScrollingHitObjectContainer)playfield.HitObjectContainer;
[Resolved]
- private Playfield playfield { get; set; }
+ private Playfield playfield { get; set; } = null!;
public override bool HandleMovement(MoveSelectionEvent moveEvent)
{
diff --git a/osu.Game.Rulesets.Catch/Edit/Checks/CheckBananaShowerGap.cs b/osu.Game.Rulesets.Catch/Edit/Checks/CheckBananaShowerGap.cs
index 00fd74c9a8..4b2933c0e1 100644
--- a/osu.Game.Rulesets.Catch/Edit/Checks/CheckBananaShowerGap.cs
+++ b/osu.Game.Rulesets.Catch/Edit/Checks/CheckBananaShowerGap.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System;
using System.Collections.Generic;
using osu.Game.Beatmaps;
diff --git a/osu.Game.Rulesets.Catch/Edit/DrawableCatchEditorRuleset.cs b/osu.Game.Rulesets.Catch/Edit/DrawableCatchEditorRuleset.cs
index 67238f66d4..7ad2106ab9 100644
--- a/osu.Game.Rulesets.Catch/Edit/DrawableCatchEditorRuleset.cs
+++ b/osu.Game.Rulesets.Catch/Edit/DrawableCatchEditorRuleset.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System.Collections.Generic;
using osu.Framework.Bindables;
using osu.Game.Beatmaps;
@@ -12,11 +10,11 @@ using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.Catch.Edit
{
- public class DrawableCatchEditorRuleset : DrawableCatchRuleset
+ public partial class DrawableCatchEditorRuleset : DrawableCatchRuleset
{
public readonly BindableDouble TimeRangeMultiplier = new BindableDouble(1);
- public DrawableCatchEditorRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnlyList mods = null)
+ public DrawableCatchEditorRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnlyList? mods = null)
: base(ruleset, beatmap, mods)
{
}
diff --git a/osu.Game.Rulesets.Catch/Edit/FruitCompositionTool.cs b/osu.Game.Rulesets.Catch/Edit/FruitCompositionTool.cs
index 5c13692b51..f776fe39c1 100644
--- a/osu.Game.Rulesets.Catch/Edit/FruitCompositionTool.cs
+++ b/osu.Game.Rulesets.Catch/Edit/FruitCompositionTool.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Graphics;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Edit.Blueprints;
diff --git a/osu.Game.Rulesets.Catch/Edit/JuiceStreamCompositionTool.cs b/osu.Game.Rulesets.Catch/Edit/JuiceStreamCompositionTool.cs
index 85cf89f700..cb66e2952e 100644
--- a/osu.Game.Rulesets.Catch/Edit/JuiceStreamCompositionTool.cs
+++ b/osu.Game.Rulesets.Catch/Edit/JuiceStreamCompositionTool.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Graphics;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Edit.Blueprints;
diff --git a/osu.Game.Rulesets.Catch/Judgements/CatchBananaJudgement.cs b/osu.Game.Rulesets.Catch/Judgements/CatchBananaJudgement.cs
index 15f6e4a64d..b919102215 100644
--- a/osu.Game.Rulesets.Catch/Judgements/CatchBananaJudgement.cs
+++ b/osu.Game.Rulesets.Catch/Judgements/CatchBananaJudgement.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Scoring;
diff --git a/osu.Game.Rulesets.Catch/Judgements/CatchDropletJudgement.cs b/osu.Game.Rulesets.Catch/Judgements/CatchDropletJudgement.cs
index 90aa6f41a1..8fd7b93e4c 100644
--- a/osu.Game.Rulesets.Catch/Judgements/CatchDropletJudgement.cs
+++ b/osu.Game.Rulesets.Catch/Judgements/CatchDropletJudgement.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Catch.Judgements
diff --git a/osu.Game.Rulesets.Catch/Judgements/CatchJudgement.cs b/osu.Game.Rulesets.Catch/Judgements/CatchJudgement.cs
index e5d6429660..ccafe0abc4 100644
--- a/osu.Game.Rulesets.Catch/Judgements/CatchJudgement.cs
+++ b/osu.Game.Rulesets.Catch/Judgements/CatchJudgement.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Scoring;
diff --git a/osu.Game.Rulesets.Catch/Judgements/CatchJudgementResult.cs b/osu.Game.Rulesets.Catch/Judgements/CatchJudgementResult.cs
index 6cc79f9619..4cec61d016 100644
--- a/osu.Game.Rulesets.Catch/Judgements/CatchJudgementResult.cs
+++ b/osu.Game.Rulesets.Catch/Judgements/CatchJudgementResult.cs
@@ -1,9 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
-using JetBrains.Annotations;
using osu.Game.Rulesets.Catch.UI;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects;
@@ -22,7 +19,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
///
public bool CatcherHyperDash;
- public CatchJudgementResult([NotNull] HitObject hitObject, [NotNull] Judgement judgement)
+ public CatchJudgementResult(HitObject hitObject, Judgement judgement)
: base(hitObject, judgement)
{
}
diff --git a/osu.Game.Rulesets.Catch/Judgements/CatchTinyDropletJudgement.cs b/osu.Game.Rulesets.Catch/Judgements/CatchTinyDropletJudgement.cs
index c9052e3c39..d957d4171b 100644
--- a/osu.Game.Rulesets.Catch/Judgements/CatchTinyDropletJudgement.cs
+++ b/osu.Game.Rulesets.Catch/Judgements/CatchTinyDropletJudgement.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Catch.Judgements
diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModDaycore.cs b/osu.Game.Rulesets.Catch/Mods/CatchModDaycore.cs
index cae19e9468..180cb98ed7 100644
--- a/osu.Game.Rulesets.Catch/Mods/CatchModDaycore.cs
+++ b/osu.Game.Rulesets.Catch/Mods/CatchModDaycore.cs
@@ -7,6 +7,5 @@ namespace osu.Game.Rulesets.Catch.Mods
{
public class CatchModDaycore : ModDaycore
{
- public override double ScoreMultiplier => 0.3;
}
}
diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModDifficultyAdjust.cs b/osu.Game.Rulesets.Catch/Mods/CatchModDifficultyAdjust.cs
index e59a0a0431..6efb415880 100644
--- a/osu.Game.Rulesets.Catch/Mods/CatchModDifficultyAdjust.cs
+++ b/osu.Game.Rulesets.Catch/Mods/CatchModDifficultyAdjust.cs
@@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Catch.Mods
public DifficultyBindable CircleSize { get; } = new DifficultyBindable
{
Precision = 0.1f,
- MinValue = 1,
+ MinValue = 0,
MaxValue = 10,
ExtendedMaxValue = 11,
ReadCurrentFromDifficulty = diff => diff.CircleSize,
@@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Catch.Mods
public DifficultyBindable ApproachRate { get; } = new DifficultyBindable
{
Precision = 0.1f,
- MinValue = 1,
+ MinValue = 0,
MaxValue = 10,
ExtendedMaxValue = 11,
ReadCurrentFromDifficulty = diff => diff.ApproachRate,
diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModDoubleTime.cs b/osu.Game.Rulesets.Catch/Mods/CatchModDoubleTime.cs
index 57c06e1cd1..83db9f665b 100644
--- a/osu.Game.Rulesets.Catch/Mods/CatchModDoubleTime.cs
+++ b/osu.Game.Rulesets.Catch/Mods/CatchModDoubleTime.cs
@@ -7,6 +7,5 @@ namespace osu.Game.Rulesets.Catch.Mods
{
public class CatchModDoubleTime : ModDoubleTime
{
- public override double ScoreMultiplier => UsesDefaultConfiguration ? 1.06 : 1;
}
}
diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModFlashlight.cs b/osu.Game.Rulesets.Catch/Mods/CatchModFlashlight.cs
index a9e9e8fbd5..40450c6729 100644
--- a/osu.Game.Rulesets.Catch/Mods/CatchModFlashlight.cs
+++ b/osu.Game.Rulesets.Catch/Mods/CatchModFlashlight.cs
@@ -11,7 +11,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Mods
{
- public class CatchModFlashlight : ModFlashlight
+ public partial class CatchModFlashlight : ModFlashlight
{
public override double ScoreMultiplier => UsesDefaultConfiguration ? 1.12 : 1;
@@ -36,7 +36,7 @@ namespace osu.Game.Rulesets.Catch.Mods
base.ApplyToDrawableRuleset(drawableRuleset);
}
- private class CatchFlashlight : Flashlight
+ private partial class CatchFlashlight : Flashlight
{
private readonly CatchPlayfield playfield;
diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModHalfTime.cs b/osu.Game.Rulesets.Catch/Mods/CatchModHalfTime.cs
index ce06b841aa..3afb8c3d89 100644
--- a/osu.Game.Rulesets.Catch/Mods/CatchModHalfTime.cs
+++ b/osu.Game.Rulesets.Catch/Mods/CatchModHalfTime.cs
@@ -7,6 +7,5 @@ namespace osu.Game.Rulesets.Catch.Mods
{
public class CatchModHalfTime : ModHalfTime
{
- public override double ScoreMultiplier => 0.3;
}
}
diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModNightcore.cs b/osu.Game.Rulesets.Catch/Mods/CatchModNightcore.cs
index 9e38913be7..c537897439 100644
--- a/osu.Game.Rulesets.Catch/Mods/CatchModNightcore.cs
+++ b/osu.Game.Rulesets.Catch/Mods/CatchModNightcore.cs
@@ -8,6 +8,5 @@ namespace osu.Game.Rulesets.Catch.Mods
{
public class CatchModNightcore : ModNightcore
{
- public override double ScoreMultiplier => UsesDefaultConfiguration ? 1.06 : 1;
}
}
diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModNoScope.cs b/osu.Game.Rulesets.Catch/Mods/CatchModNoScope.cs
index 19b4a39f97..ddeea51ecb 100644
--- a/osu.Game.Rulesets.Catch/Mods/CatchModNoScope.cs
+++ b/osu.Game.Rulesets.Catch/Mods/CatchModNoScope.cs
@@ -26,6 +26,9 @@ namespace osu.Game.Rulesets.Catch.Mods
var catchPlayfield = (CatchPlayfield)playfield;
bool shouldAlwaysShowCatcher = IsBreakTime.Value;
float targetAlpha = shouldAlwaysShowCatcher ? 1 : ComboBasedAlpha;
+
+ // AlwaysPresent required for catcher to still act on input when fully hidden.
+ catchPlayfield.CatcherArea.AlwaysPresent = true;
catchPlayfield.CatcherArea.Alpha = (float)Interpolation.Lerp(catchPlayfield.CatcherArea.Alpha, targetAlpha, Math.Clamp(catchPlayfield.Time.Elapsed / TRANSITION_DURATION, 0, 1));
}
}
diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModRelax.cs b/osu.Game.Rulesets.Catch/Mods/CatchModRelax.cs
index 3f7560844c..83ad96d5b4 100644
--- a/osu.Game.Rulesets.Catch/Mods/CatchModRelax.cs
+++ b/osu.Game.Rulesets.Catch/Mods/CatchModRelax.cs
@@ -15,7 +15,7 @@ using osuTK;
namespace osu.Game.Rulesets.Catch.Mods
{
- public class CatchModRelax : ModRelax, IApplicableToDrawableRuleset, IApplicableToPlayer
+ public partial class CatchModRelax : ModRelax, IApplicableToDrawableRuleset, IApplicableToPlayer
{
public override LocalisableString Description => @"Use the mouse to control the catcher.";
@@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Catch.Mods
}
}
- private class MouseInputHelper : Drawable, IKeyBindingHandler, IRequireHighFrequencyMousePosition
+ private partial class MouseInputHelper : Drawable, IKeyBindingHandler, IRequireHighFrequencyMousePosition
{
private readonly CatcherArea catcherArea;
diff --git a/osu.Game.Rulesets.Catch/Objects/Banana.cs b/osu.Game.Rulesets.Catch/Objects/Banana.cs
index af03c9acab..b80527f379 100644
--- a/osu.Game.Rulesets.Catch/Objects/Banana.cs
+++ b/osu.Game.Rulesets.Catch/Objects/Banana.cs
@@ -22,11 +22,11 @@ namespace osu.Game.Rulesets.Catch.Objects
public override Judgement CreateJudgement() => new CatchBananaJudgement();
- private static readonly List samples = new List { new BananaHitSampleInfo() };
+ private static readonly IList default_banana_samples = new List { new BananaHitSampleInfo() }.AsReadOnly();
public Banana()
{
- Samples = samples;
+ Samples = default_banana_samples;
}
// override any external colour changes with banananana
@@ -47,18 +47,18 @@ namespace osu.Game.Rulesets.Catch.Objects
}
}
- private class BananaHitSampleInfo : HitSampleInfo, IEquatable
+ public class BananaHitSampleInfo : HitSampleInfo, IEquatable
{
private static readonly string[] lookup_names = { "Gameplay/metronomelow", "Gameplay/catch-banana" };
public override IEnumerable LookupNames => lookup_names;
- public BananaHitSampleInfo(int volume = 0)
+ public BananaHitSampleInfo(int volume = 100)
: base(string.Empty, volume: volume)
{
}
- public sealed override HitSampleInfo With(Optional newName = default, Optional newBank = default, Optional newSuffix = default, Optional newVolume = default)
+ public sealed override HitSampleInfo With(Optional newName = default, Optional newBank = default, Optional newSuffix = default, Optional newVolume = default)
=> new BananaHitSampleInfo(newVolume.GetOr(Volume));
public bool Equals(BananaHitSampleInfo? other)
diff --git a/osu.Game.Rulesets.Catch/Objects/BananaShower.cs b/osu.Game.Rulesets.Catch/Objects/BananaShower.cs
index e5541e49c1..b05c8e5f77 100644
--- a/osu.Game.Rulesets.Catch/Objects/BananaShower.cs
+++ b/osu.Game.Rulesets.Catch/Objects/BananaShower.cs
@@ -1,9 +1,9 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
+using System.Collections.Generic;
using System.Threading;
+using osu.Game.Audio;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects.Types;
@@ -41,6 +41,7 @@ namespace osu.Game.Rulesets.Catch.Objects
{
StartTime = time,
BananaIndex = i,
+ Samples = new List { new Banana.BananaHitSampleInfo(CreateHitSampleInfo().Volume) }
});
time += spacing;
diff --git a/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs b/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs
index cd2b8348e2..f4bd515995 100644
--- a/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs
+++ b/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System;
using Newtonsoft.Json;
using osu.Framework.Bindables;
diff --git a/osu.Game.Rulesets.Catch/Objects/Drawables/CaughtBanana.cs b/osu.Game.Rulesets.Catch/Objects/Drawables/CaughtBanana.cs
index 31a27b6047..bfeb37b1b7 100644
--- a/osu.Game.Rulesets.Catch/Objects/Drawables/CaughtBanana.cs
+++ b/osu.Game.Rulesets.Catch/Objects/Drawables/CaughtBanana.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Game.Rulesets.Catch.Skinning.Default;
namespace osu.Game.Rulesets.Catch.Objects.Drawables
@@ -10,7 +8,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
///
/// Represents a caught by the catcher.
///
- public class CaughtBanana : CaughtObject
+ public partial class CaughtBanana : CaughtObject
{
public CaughtBanana()
: base(CatchSkinComponents.Banana, _ => new BananaPiece())
diff --git a/osu.Game.Rulesets.Catch/Objects/Drawables/CaughtDroplet.cs b/osu.Game.Rulesets.Catch/Objects/Drawables/CaughtDroplet.cs
index 6d5dd0ed25..d228c629c0 100644
--- a/osu.Game.Rulesets.Catch/Objects/Drawables/CaughtDroplet.cs
+++ b/osu.Game.Rulesets.Catch/Objects/Drawables/CaughtDroplet.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Game.Rulesets.Catch.Skinning.Default;
namespace osu.Game.Rulesets.Catch.Objects.Drawables
@@ -10,7 +8,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
///
/// Represents a caught by the catcher.
///
- public class CaughtDroplet : CaughtObject
+ public partial class CaughtDroplet : CaughtObject
{
public override bool StaysOnPlate => false;
diff --git a/osu.Game.Rulesets.Catch/Objects/Drawables/CaughtFruit.cs b/osu.Game.Rulesets.Catch/Objects/Drawables/CaughtFruit.cs
index 89757748ab..99dcac5268 100644
--- a/osu.Game.Rulesets.Catch/Objects/Drawables/CaughtFruit.cs
+++ b/osu.Game.Rulesets.Catch/Objects/Drawables/CaughtFruit.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Game.Rulesets.Catch.Skinning.Default;
namespace osu.Game.Rulesets.Catch.Objects.Drawables
@@ -10,7 +8,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
///
/// Represents a caught by the catcher.
///
- public class CaughtFruit : CaughtObject
+ public partial class CaughtFruit : CaughtObject
{
public CaughtFruit()
: base(CatchSkinComponents.Fruit, _ => new FruitPiece())
diff --git a/osu.Game.Rulesets.Catch/Objects/Drawables/CaughtObject.cs b/osu.Game.Rulesets.Catch/Objects/Drawables/CaughtObject.cs
index fd0ffbd032..0c26c52171 100644
--- a/osu.Game.Rulesets.Catch/Objects/Drawables/CaughtObject.cs
+++ b/osu.Game.Rulesets.Catch/Objects/Drawables/CaughtObject.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
@@ -17,9 +15,9 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
/// Represents a caught by the catcher.
///
[Cached(typeof(IHasCatchObjectState))]
- public abstract class CaughtObject : SkinnableDrawable, IHasCatchObjectState
+ public abstract partial class CaughtObject : SkinnableDrawable, IHasCatchObjectState
{
- public PalpableCatchHitObject HitObject { get; private set; }
+ public PalpableCatchHitObject HitObject { get; private set; } = null!;
public Bindable AccentColour { get; } = new Bindable();
public Bindable HyperDash { get; } = new Bindable();
public Bindable IndexInBeatmap { get; } = new Bindable();
@@ -28,6 +26,8 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
public float DisplayRotation => Rotation;
+ public double DisplayStartTime => HitObject.StartTime;
+
///
/// Whether this hit object should stay on the catcher plate when the object is caught by the catcher.
///
@@ -35,8 +35,8 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
public override bool RemoveWhenNotAlive => true;
- protected CaughtObject(CatchSkinComponents skinComponent, Func defaultImplementation)
- : base(new CatchSkinComponent(skinComponent), defaultImplementation)
+ protected CaughtObject(CatchSkinComponents skinComponent, Func defaultImplementation)
+ : base(new CatchSkinComponentLookup(skinComponent), defaultImplementation)
{
Origin = Anchor.Centre;
diff --git a/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableBanana.cs b/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableBanana.cs
index b46a452bd0..26e304cf3f 100644
--- a/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableBanana.cs
+++ b/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableBanana.cs
@@ -1,9 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
-using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Catch.Skinning.Default;
@@ -11,14 +8,14 @@ using osu.Game.Skinning;
namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
- public class DrawableBanana : DrawablePalpableCatchHitObject
+ public partial class DrawableBanana : DrawablePalpableCatchHitObject
{
public DrawableBanana()
: this(null)
{
}
- public DrawableBanana([CanBeNull] Banana h)
+ public DrawableBanana(Banana? h)
: base(h)
{
}
@@ -27,7 +24,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
private void load()
{
ScalingContainer.Child = new SkinnableDrawable(
- new CatchSkinComponent(CatchSkinComponents.Banana),
+ new CatchSkinComponentLookup(CatchSkinComponents.Banana),
_ => new BananaPiece());
}
diff --git a/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableBananaShower.cs b/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableBananaShower.cs
index f061f206ff..03adbce885 100644
--- a/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableBananaShower.cs
+++ b/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableBananaShower.cs
@@ -1,16 +1,13 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
-using JetBrains.Annotations;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Rulesets.Objects.Drawables;
namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
- public class DrawableBananaShower : DrawableCatchHitObject
+ public partial class DrawableBananaShower : DrawableCatchHitObject
{
private readonly Container bananaContainer;
@@ -19,7 +16,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
}
- public DrawableBananaShower([CanBeNull] BananaShower s)
+ public DrawableBananaShower(BananaShower? s)
: base(s)
{
RelativeSizeAxes = Axes.X;
diff --git a/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableCatchHitObject.cs b/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableCatchHitObject.cs
index 23264edf3d..7f8c17861d 100644
--- a/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableCatchHitObject.cs
+++ b/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableCatchHitObject.cs
@@ -15,7 +15,7 @@ using osu.Game.Utils;
namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
- public abstract class DrawableCatchHitObject : DrawableHitObject
+ public abstract partial class DrawableCatchHitObject : DrawableHitObject
{
public readonly Bindable OriginalXBindable = new Bindable();
public readonly Bindable XOffsetBindable = new Bindable();
@@ -53,6 +53,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
XOffsetBindable.UnbindFrom(HitObject.XOffsetBindable);
}
+ [CanBeNull]
public Func CheckPosition;
protected override JudgementResult CreateResult(Judgement judgement) => new CatchJudgementResult(HitObject, judgement);
diff --git a/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableDroplet.cs b/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableDroplet.cs
index d367ad0a00..8f32cdcc31 100644
--- a/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableDroplet.cs
+++ b/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableDroplet.cs
@@ -1,9 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
-using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Catch.Skinning.Default;
@@ -11,14 +8,14 @@ using osu.Game.Skinning;
namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
- public class DrawableDroplet : DrawablePalpableCatchHitObject
+ public partial class DrawableDroplet : DrawablePalpableCatchHitObject
{
public DrawableDroplet()
: this(null)
{
}
- public DrawableDroplet([CanBeNull] CatchHitObject h)
+ public DrawableDroplet(CatchHitObject? h)
: base(h)
{
}
@@ -27,7 +24,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
private void load()
{
ScalingContainer.Child = new SkinnableDrawable(
- new CatchSkinComponent(CatchSkinComponents.Droplet),
+ new CatchSkinComponentLookup(CatchSkinComponents.Droplet),
_ => new DropletPiece());
}
diff --git a/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableFruit.cs b/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableFruit.cs
index ce4c7e5aff..52c53523e6 100644
--- a/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableFruit.cs
+++ b/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableFruit.cs
@@ -1,9 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
-using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Catch.Skinning.Default;
@@ -11,14 +8,14 @@ using osu.Game.Skinning;
namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
- public class DrawableFruit : DrawablePalpableCatchHitObject
+ public partial class DrawableFruit : DrawablePalpableCatchHitObject
{
public DrawableFruit()
: this(null)
{
}
- public DrawableFruit([CanBeNull] Fruit h)
+ public DrawableFruit(Fruit? h)
: base(h)
{
}
@@ -27,7 +24,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
private void load()
{
ScalingContainer.Child = new SkinnableDrawable(
- new CatchSkinComponent(CatchSkinComponents.Fruit),
+ new CatchSkinComponentLookup(CatchSkinComponents.Fruit),
_ => new FruitPiece());
}
diff --git a/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableJuiceStream.cs b/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableJuiceStream.cs
index 12a44c909e..41ecf59276 100644
--- a/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableJuiceStream.cs
+++ b/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableJuiceStream.cs
@@ -1,16 +1,13 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
-using JetBrains.Annotations;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Rulesets.Objects.Drawables;
namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
- public class DrawableJuiceStream : DrawableCatchHitObject
+ public partial class DrawableJuiceStream : DrawableCatchHitObject
{
private readonly Container dropletContainer;
@@ -19,7 +16,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
}
- public DrawableJuiceStream([CanBeNull] JuiceStream s)
+ public DrawableJuiceStream(JuiceStream? s)
: base(s)
{
RelativeSizeAxes = Axes.X;
diff --git a/osu.Game.Rulesets.Catch/Objects/Drawables/DrawablePalpableCatchHitObject.cs b/osu.Game.Rulesets.Catch/Objects/Drawables/DrawablePalpableCatchHitObject.cs
index 5de372852b..4a9661f108 100644
--- a/osu.Game.Rulesets.Catch/Objects/Drawables/DrawablePalpableCatchHitObject.cs
+++ b/osu.Game.Rulesets.Catch/Objects/Drawables/DrawablePalpableCatchHitObject.cs
@@ -1,9 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
-using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
@@ -14,10 +11,12 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
[Cached(typeof(IHasCatchObjectState))]
- public abstract class DrawablePalpableCatchHitObject : DrawableCatchHitObject, IHasCatchObjectState
+ public abstract partial class DrawablePalpableCatchHitObject : DrawableCatchHitObject, IHasCatchObjectState
{
public new PalpableCatchHitObject HitObject => (PalpableCatchHitObject)base.HitObject;
+ public double DisplayStartTime => LifetimeStart;
+
Bindable IHasCatchObjectState.AccentColour => AccentColour;
public Bindable HyperDash { get; } = new Bindable();
@@ -40,7 +39,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
public float DisplayRotation => ScalingContainer.Rotation;
- protected DrawablePalpableCatchHitObject([CanBeNull] CatchHitObject h)
+ protected DrawablePalpableCatchHitObject(CatchHitObject? h)
: base(h)
{
Origin = Anchor.Centre;
diff --git a/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableTinyDroplet.cs b/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableTinyDroplet.cs
index 8c48b62c7e..f820ccdc62 100644
--- a/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableTinyDroplet.cs
+++ b/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableTinyDroplet.cs
@@ -1,13 +1,9 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
-using JetBrains.Annotations;
-
namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
- public class DrawableTinyDroplet : DrawableDroplet
+ public partial class DrawableTinyDroplet : DrawableDroplet
{
protected override float ScaleFactor => base.ScaleFactor / 2;
@@ -16,7 +12,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
}
- public DrawableTinyDroplet([CanBeNull] TinyDroplet h)
+ public DrawableTinyDroplet(TinyDroplet? h)
: base(h)
{
}
diff --git a/osu.Game.Rulesets.Catch/Objects/Drawables/IHasCatchObjectState.cs b/osu.Game.Rulesets.Catch/Objects/Drawables/IHasCatchObjectState.cs
index 93c80b09db..18fc0db6e3 100644
--- a/osu.Game.Rulesets.Catch/Objects/Drawables/IHasCatchObjectState.cs
+++ b/osu.Game.Rulesets.Catch/Objects/Drawables/IHasCatchObjectState.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Bindables;
using osuTK;
using osuTK.Graphics;
@@ -16,6 +14,8 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
PalpableCatchHitObject HitObject { get; }
+ double DisplayStartTime { get; }
+
Bindable AccentColour { get; }
Bindable HyperDash { get; }
diff --git a/osu.Game.Rulesets.Catch/Objects/Droplet.cs b/osu.Game.Rulesets.Catch/Objects/Droplet.cs
index ecaa4bfaf4..9c1004a04b 100644
--- a/osu.Game.Rulesets.Catch/Objects/Droplet.cs
+++ b/osu.Game.Rulesets.Catch/Objects/Droplet.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Game.Rulesets.Catch.Judgements;
using osu.Game.Rulesets.Judgements;
diff --git a/osu.Game.Rulesets.Catch/Objects/Fruit.cs b/osu.Game.Rulesets.Catch/Objects/Fruit.cs
index bdf8b3f28d..4818fe2cad 100644
--- a/osu.Game.Rulesets.Catch/Objects/Fruit.cs
+++ b/osu.Game.Rulesets.Catch/Objects/Fruit.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Game.Rulesets.Catch.Judgements;
using osu.Game.Rulesets.Judgements;
diff --git a/osu.Game.Rulesets.Catch/Objects/FruitVisualRepresentation.cs b/osu.Game.Rulesets.Catch/Objects/FruitVisualRepresentation.cs
index e5d013dafc..7ec7050245 100644
--- a/osu.Game.Rulesets.Catch/Objects/FruitVisualRepresentation.cs
+++ b/osu.Game.Rulesets.Catch/Objects/FruitVisualRepresentation.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
namespace osu.Game.Rulesets.Catch.Objects
{
public enum FruitVisualRepresentation
diff --git a/osu.Game.Rulesets.Catch/Objects/JuiceStream.cs b/osu.Game.Rulesets.Catch/Objects/JuiceStream.cs
index 015457e84f..169e99c90c 100644
--- a/osu.Game.Rulesets.Catch/Objects/JuiceStream.cs
+++ b/osu.Game.Rulesets.Catch/Objects/JuiceStream.cs
@@ -1,13 +1,12 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using Newtonsoft.Json;
+using osu.Framework.Bindables;
using osu.Game.Audio;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
@@ -18,7 +17,7 @@ using osu.Game.Rulesets.Objects.Types;
namespace osu.Game.Rulesets.Catch.Objects
{
- public class JuiceStream : CatchHitObject, IHasPathWithRepeats
+ public class JuiceStream : CatchHitObject, IHasPathWithRepeats, IHasSliderVelocity
{
///
/// Positional distance that results in a duration of one second, before any speed adjustments.
@@ -29,6 +28,19 @@ namespace osu.Game.Rulesets.Catch.Objects
public int RepeatCount { get; set; }
+ public BindableNumber SliderVelocityBindable { get; } = new BindableDouble(1)
+ {
+ Precision = 0.01,
+ MinValue = 0.1,
+ MaxValue = 10
+ };
+
+ public double SliderVelocity
+ {
+ get => SliderVelocityBindable.Value;
+ set => SliderVelocityBindable.Value = value;
+ }
+
[JsonIgnore]
private double velocityFactor;
@@ -36,10 +48,10 @@ namespace osu.Game.Rulesets.Catch.Objects
private double tickDistanceFactor;
[JsonIgnore]
- public double Velocity => velocityFactor * DifficultyControlPoint.SliderVelocity;
+ public double Velocity => velocityFactor * SliderVelocity;
[JsonIgnore]
- public double TickDistance => tickDistanceFactor * DifficultyControlPoint.SliderVelocity;
+ public double TickDistance => tickDistanceFactor * SliderVelocity;
///
/// The length of one span of this .
@@ -142,13 +154,8 @@ namespace osu.Game.Rulesets.Catch.Objects
set
{
path.ControlPoints.Clear();
- path.ExpectedDistance.Value = null;
-
- if (value != null)
- {
- path.ControlPoints.AddRange(value.ControlPoints.Select(c => new PathControlPoint(c.Position, c.Type)));
- path.ExpectedDistance.Value = value.ExpectedDistance.Value;
- }
+ path.ControlPoints.AddRange(value.ControlPoints.Select(c => new PathControlPoint(c.Position, c.Type)));
+ path.ExpectedDistance.Value = value.ExpectedDistance.Value;
}
}
diff --git a/osu.Game.Rulesets.Catch/Objects/PalpableCatchHitObject.cs b/osu.Game.Rulesets.Catch/Objects/PalpableCatchHitObject.cs
index c9bc9ca2ac..197029aeeb 100644
--- a/osu.Game.Rulesets.Catch/Objects/PalpableCatchHitObject.cs
+++ b/osu.Game.Rulesets.Catch/Objects/PalpableCatchHitObject.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using Newtonsoft.Json;
using osu.Framework.Bindables;
using osu.Game.Rulesets.Objects;
@@ -34,13 +32,13 @@ namespace osu.Game.Rulesets.Catch.Objects
///
public bool HyperDash => hyperDash.Value;
- private CatchHitObject hyperDashTarget;
+ private CatchHitObject? hyperDashTarget;
///
/// The target fruit if we are to initiate a hyperdash.
///
[JsonIgnore]
- public CatchHitObject HyperDashTarget
+ public CatchHitObject? HyperDashTarget
{
get => hyperDashTarget;
set
diff --git a/osu.Game.Rulesets.Catch/Objects/TinyDroplet.cs b/osu.Game.Rulesets.Catch/Objects/TinyDroplet.cs
index 6bd5f0ac2a..1bf160b5a6 100644
--- a/osu.Game.Rulesets.Catch/Objects/TinyDroplet.cs
+++ b/osu.Game.Rulesets.Catch/Objects/TinyDroplet.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Game.Rulesets.Catch.Judgements;
using osu.Game.Rulesets.Judgements;
diff --git a/osu.Game.Rulesets.Catch/Properties/AssemblyInfo.cs b/osu.Game.Rulesets.Catch/Properties/AssemblyInfo.cs
index 6c7f0478a7..26f20b223a 100644
--- a/osu.Game.Rulesets.Catch/Properties/AssemblyInfo.cs
+++ b/osu.Game.Rulesets.Catch/Properties/AssemblyInfo.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System.Runtime.CompilerServices;
// We publish our internal attributes to other sub-projects of the framework.
diff --git a/osu.Game.Rulesets.Catch/Scoring/CatchScoreProcessor.cs b/osu.Game.Rulesets.Catch/Scoring/CatchScoreProcessor.cs
index ba3d529212..b6a42407da 100644
--- a/osu.Game.Rulesets.Catch/Scoring/CatchScoreProcessor.cs
+++ b/osu.Game.Rulesets.Catch/Scoring/CatchScoreProcessor.cs
@@ -1,13 +1,11 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Catch.Scoring
{
- public class CatchScoreProcessor : ScoreProcessor
+ public partial class CatchScoreProcessor : ScoreProcessor
{
public CatchScoreProcessor()
: base(new CatchRuleset())
diff --git a/osu.Game.Rulesets.Catch/Skinning/Argon/ArgonBananaPiece.cs b/osu.Game.Rulesets.Catch/Skinning/Argon/ArgonBananaPiece.cs
new file mode 100644
index 0000000000..8cdb490922
--- /dev/null
+++ b/osu.Game.Rulesets.Catch/Skinning/Argon/ArgonBananaPiece.cs
@@ -0,0 +1,122 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using osu.Framework.Allocation;
+using osu.Framework.Extensions.Color4Extensions;
+using osu.Framework.Graphics;
+using osu.Framework.Graphics.Colour;
+using osu.Framework.Graphics.Containers;
+using osu.Framework.Graphics.Effects;
+using osu.Framework.Graphics.Shapes;
+using osu.Framework.Utils;
+using osu.Game.Rulesets.Catch.Objects;
+using osuTK;
+using osuTK.Graphics;
+
+namespace osu.Game.Rulesets.Catch.Skinning.Argon
+{
+ internal partial class ArgonBananaPiece : ArgonFruitPiece
+ {
+ private Container stabilisedPieceContainer = null!;
+
+ private Drawable fadeContent = null!;
+
+ [BackgroundDependencyLoader]
+ private void load()
+ {
+ AddInternal(fadeContent = new Container
+ {
+ RelativeSizeAxes = Axes.Both,
+ Children = new Drawable[]
+ {
+ stabilisedPieceContainer = new Container
+ {
+ RelativeSizeAxes = Axes.Both,
+ Anchor = Anchor.Centre,
+ Origin = Anchor.Centre,
+ Children = new Drawable[]
+ {
+ new Circle
+ {
+ Colour = Color4.White.Opacity(0.4f),
+ Anchor = Anchor.Centre,
+ Origin = Anchor.Centre,
+ Blending = BlendingParameters.Additive,
+ Size = new Vector2(8),
+ Scale = new Vector2(25, 1),
+ },
+ new Box
+ {
+ Colour = ColourInfo.GradientHorizontal(Color4.White.Opacity(0), Color4.White.Opacity(0.8f)),
+ RelativeSizeAxes = Axes.X,
+ Blending = BlendingParameters.Additive,
+ Anchor = Anchor.Centre,
+ Origin = Anchor.CentreRight,
+ Width = 1.6f,
+ Height = 2,
+ },
+ new Circle
+ {
+ Colour = ColourInfo.GradientHorizontal(Color4.White.Opacity(0.8f), Color4.White.Opacity(0)),
+ RelativeSizeAxes = Axes.X,
+ Blending = BlendingParameters.Additive,
+ Anchor = Anchor.Centre,
+ Origin = Anchor.CentreLeft,
+ Width = 1.6f,
+ Height = 2,
+ },
+ }
+ },
+ new Circle
+ {
+ RelativeSizeAxes = Axes.Both,
+ Anchor = Anchor.Centre,
+ Origin = Anchor.Centre,
+ Size = new Vector2(1.2f),
+ EdgeEffect = new EdgeEffectParameters
+ {
+ Type = EdgeEffectType.Glow,
+ Hollow = false,
+ Colour = Color4.White.Opacity(0.1f),
+ Radius = 50,
+ },
+ Child =
+ {
+ Alpha = 0,
+ AlwaysPresent = true,
+ },
+ BorderColour = Color4.White.Opacity(0.1f),
+ BorderThickness = 3,
+ },
+ }
+ });
+ }
+
+ protected override void Update()
+ {
+ base.Update();
+
+ const float parent_scale_application = 0.4f;
+
+ // relative to time on screen
+ const float lens_flare_start = 0.3f;
+ const float lens_flare_end = 0.8f;
+
+ // Undo some of the parent scale being applied to make the lens flare feel a bit better..
+ float scale = parent_scale_application + (1 - parent_scale_application) * (1 / (ObjectState.DisplaySize.X / (CatchHitObject.OBJECT_RADIUS * 2)));
+
+ stabilisedPieceContainer.Rotation = -ObjectState.DisplayRotation;
+ stabilisedPieceContainer.Scale = new Vector2(scale, 1);
+
+ double duration = ObjectState.HitObject.StartTime - ObjectState.DisplayStartTime;
+
+ fadeContent.Alpha = MathHelper.Clamp(
+ Interpolation.ValueAt(
+ Time.Current, 1f, 0f,
+ ObjectState.DisplayStartTime + duration * lens_flare_start,
+ ObjectState.DisplayStartTime + duration * lens_flare_end,
+ Easing.OutQuint
+ ), 0, 1);
+ }
+ }
+}
diff --git a/osu.Game.Rulesets.Catch/Skinning/Argon/ArgonCatcher.cs b/osu.Game.Rulesets.Catch/Skinning/Argon/ArgonCatcher.cs
new file mode 100644
index 0000000000..82374085c8
--- /dev/null
+++ b/osu.Game.Rulesets.Catch/Skinning/Argon/ArgonCatcher.cs
@@ -0,0 +1,85 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using osu.Framework.Allocation;
+using osu.Framework.Graphics;
+using osu.Framework.Graphics.Containers;
+using osu.Framework.Graphics.Shapes;
+using osu.Game.Rulesets.Catch.UI;
+using osuTK.Graphics;
+
+namespace osu.Game.Rulesets.Catch.Skinning.Argon
+{
+ public partial class ArgonCatcher : CompositeDrawable
+ {
+ [BackgroundDependencyLoader]
+ private void load()
+ {
+ RelativeSizeAxes = Axes.Both;
+
+ InternalChildren = new Drawable[]
+ {
+ new Container
+ {
+ Anchor = Anchor.TopCentre,
+ Origin = Anchor.TopCentre,
+ RelativeSizeAxes = Axes.X,
+ Height = 10,
+ Children = new Drawable[]
+ {
+ new Circle
+ {
+ RelativeSizeAxes = Axes.Both,
+ Anchor = Anchor.Centre,
+ Origin = Anchor.Centre,
+ Colour = Color4.White,
+ Width = Catcher.ALLOWED_CATCH_RANGE,
+ },
+ new Box
+ {
+ Name = "long line left",
+ Anchor = Anchor.CentreLeft,
+ Origin = Anchor.CentreRight,
+ Colour = Color4.White,
+ Alpha = 0.25f,
+ RelativeSizeAxes = Axes.X,
+ Width = 20,
+ Height = 1.8f,
+ },
+ new Circle
+ {
+ Name = "bumper left",
+ Anchor = Anchor.CentreLeft,
+ Origin = Anchor.CentreLeft,
+ Colour = Color4.White,
+ RelativeSizeAxes = Axes.X,
+ Width = (1 - Catcher.ALLOWED_CATCH_RANGE) / 2,
+ Height = 4,
+ },
+ new Box
+ {
+ Name = "long line right",
+ Anchor = Anchor.CentreRight,
+ Origin = Anchor.CentreLeft,
+ Colour = Color4.White,
+ Alpha = 0.25f,
+ RelativeSizeAxes = Axes.X,
+ Width = 20,
+ Height = 1.8f,
+ },
+ new Circle
+ {
+ Name = "bumper right",
+ Anchor = Anchor.CentreRight,
+ Origin = Anchor.CentreRight,
+ Colour = Color4.White,
+ RelativeSizeAxes = Axes.X,
+ Width = (1 - Catcher.ALLOWED_CATCH_RANGE) / 2,
+ Height = 4,
+ },
+ }
+ },
+ };
+ }
+ }
+}
diff --git a/osu.Game.Rulesets.Catch/Skinning/Argon/ArgonDropletPiece.cs b/osu.Game.Rulesets.Catch/Skinning/Argon/ArgonDropletPiece.cs
new file mode 100644
index 0000000000..38fe7916f5
--- /dev/null
+++ b/osu.Game.Rulesets.Catch/Skinning/Argon/ArgonDropletPiece.cs
@@ -0,0 +1,121 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using osu.Framework.Allocation;
+using osu.Framework.Graphics;
+using osu.Framework.Graphics.Containers;
+using osu.Framework.Graphics.Shapes;
+using osu.Framework.Graphics.UserInterface;
+using osu.Framework.Utils;
+using osu.Game.Rulesets.Catch.Skinning.Default;
+using osu.Game.Rulesets.Catch.UI;
+using osuTK;
+
+namespace osu.Game.Rulesets.Catch.Skinning.Argon
+{
+ internal partial class ArgonDropletPiece : CatchHitObjectPiece
+ {
+ protected override Drawable HyperBorderPiece => hyperBorderPiece;
+
+ private Drawable hyperBorderPiece = null!;
+
+ private Container layers = null!;
+
+ private float rotationRandomness;
+
+ [BackgroundDependencyLoader]
+ private void load()
+ {
+ RelativeSizeAxes = Axes.Both;
+
+ const float droplet_scale_down = 0.7f;
+
+ int largeBlobSeed = RNG.Next();
+
+ InternalChildren = new[]
+ {
+ new Circle
+ {
+ Anchor = Anchor.Centre,
+ Origin = Anchor.Centre,
+ Size = new Vector2(20),
+ },
+ layers = new Container
+ {
+ Scale = new Vector2(droplet_scale_down),
+ Anchor = Anchor.Centre,
+ Origin = Anchor.Centre,
+ RelativeSizeAxes = Axes.Both,
+ Children = new Drawable[]
+ {
+ new CircularBlob
+ {
+ Anchor = Anchor.Centre,
+ Origin = Anchor.Centre,
+ RelativeSizeAxes = Axes.Both,
+ Blending = BlendingParameters.Additive,
+ InnerRadius = 0.5f,
+ Alpha = 0.15f,
+ Seed = largeBlobSeed
+ },
+ new CircularBlob
+ {
+ Anchor = Anchor.Centre,
+ Origin = Anchor.Centre,
+ RelativeSizeAxes = Axes.Both,
+ Blending = BlendingParameters.Additive,
+ InnerRadius = 0.4f,
+ Alpha = 0.5f,
+ Scale = new Vector2(0.7f),
+ Seed = RNG.Next()
+ },
+ }
+ },
+ hyperBorderPiece = new CircularBlob
+ {
+ Scale = new Vector2(droplet_scale_down),
+ Anchor = Anchor.Centre,
+ Origin = Anchor.Centre,
+ Colour = Catcher.DEFAULT_HYPER_DASH_COLOUR,
+ RelativeSizeAxes = Axes.Both,
+ Blending = BlendingParameters.Additive,
+ InnerRadius = 0.5f,
+ Alpha = 0.15f,
+ Seed = largeBlobSeed
+ },
+ };
+ }
+
+ protected override void LoadComplete()
+ {
+ base.LoadComplete();
+
+ AccentColour.BindValueChanged(colour =>
+ {
+ foreach (var sprite in layers)
+ sprite.Colour = colour.NewValue;
+ }, true);
+
+ rotationRandomness = RNG.NextSingle(0.2f, 1);
+ }
+
+ protected override void Update()
+ {
+ base.Update();
+
+ // Note that droplets are rotated at a higher level, so this is mostly just to create more
+ // random arrangements of the multiple layers than actually rotate.
+ //
+ // Because underlying rotation is always clockwise, we apply anti-clockwise resistance to avoid
+ // making things spin too fast.
+ for (int i = 0; i < layers.Count; i++)
+ {
+ layers[i].Rotation -=
+ (float)Clock.ElapsedFrameTime
+ * 0.4f * rotationRandomness
+ // Each layer should alternate rotation speed.
+ * (i % 2 == 1 ? 0.5f : 1);
+ }
+ }
+ }
+}
diff --git a/osu.Game.Rulesets.Catch/Skinning/Argon/ArgonFruitPiece.cs b/osu.Game.Rulesets.Catch/Skinning/Argon/ArgonFruitPiece.cs
new file mode 100644
index 0000000000..4b5319e859
--- /dev/null
+++ b/osu.Game.Rulesets.Catch/Skinning/Argon/ArgonFruitPiece.cs
@@ -0,0 +1,121 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using osu.Framework.Allocation;
+using osu.Framework.Graphics;
+using osu.Framework.Graphics.Containers;
+using osu.Framework.Graphics.Shapes;
+using osu.Framework.Graphics.UserInterface;
+using osu.Framework.Utils;
+using osu.Game.Rulesets.Catch.Skinning.Default;
+using osu.Game.Rulesets.Catch.UI;
+using osuTK;
+
+namespace osu.Game.Rulesets.Catch.Skinning.Argon
+{
+ internal partial class ArgonFruitPiece : CatchHitObjectPiece
+ {
+ protected override Drawable HyperBorderPiece => hyperBorderPiece;
+
+ private Drawable hyperBorderPiece = null!;
+
+ private Container layers = null!;
+
+ private float rotationRandomness;
+
+ [BackgroundDependencyLoader]
+ private void load()
+ {
+ RelativeSizeAxes = Axes.Both;
+
+ int largeBlobSeed = RNG.Next();
+
+ InternalChildren = new[]
+ {
+ new Circle
+ {
+ Anchor = Anchor.Centre,
+ Origin = Anchor.Centre,
+ Size = new Vector2(20),
+ },
+ layers = new Container
+ {
+ RelativeSizeAxes = Axes.Both,
+ Children = new Drawable[]
+ {
+ new CircularBlob
+ {
+ Anchor = Anchor.Centre,
+ Origin = Anchor.Centre,
+ RelativeSizeAxes = Axes.Both,
+ Blending = BlendingParameters.Additive,
+ Alpha = 0.15f,
+ InnerRadius = 0.5f,
+ Size = new Vector2(1.1f),
+ Seed = largeBlobSeed,
+ },
+ new CircularBlob
+ {
+ Anchor = Anchor.Centre,
+ Origin = Anchor.Centre,
+ RelativeSizeAxes = Axes.Both,
+ Blending = BlendingParameters.Additive,
+ InnerRadius = 0.2f,
+ Alpha = 0.5f,
+ Seed = RNG.Next(),
+ },
+ new CircularBlob
+ {
+ Anchor = Anchor.Centre,
+ Origin = Anchor.Centre,
+ RelativeSizeAxes = Axes.Both,
+ Blending = BlendingParameters.Additive,
+ InnerRadius = 0.05f,
+ Seed = RNG.Next(),
+ },
+ }
+ },
+ hyperBorderPiece = new CircularBlob
+ {
+ Anchor = Anchor.Centre,
+ Origin = Anchor.Centre,
+ Colour = Catcher.DEFAULT_HYPER_DASH_COLOUR,
+ RelativeSizeAxes = Axes.Both,
+ Blending = BlendingParameters.Additive,
+ InnerRadius = 0.08f,
+ Size = new Vector2(1.15f),
+ Seed = largeBlobSeed
+ },
+ };
+ }
+
+ protected override void LoadComplete()
+ {
+ base.LoadComplete();
+
+ AccentColour.BindValueChanged(colour =>
+ {
+ foreach (var sprite in layers)
+ sprite.Colour = colour.NewValue;
+ }, true);
+
+ rotationRandomness = RNG.NextSingle(0.2f, 1) * (RNG.NextBool() ? -1 : 1);
+ }
+
+ protected override void Update()
+ {
+ base.Update();
+
+ for (int i = 0; i < layers.Count; i++)
+ {
+ layers[i].Rotation +=
+ // Layers are ordered from largest to smallest. Smaller layers should rotate more.
+ (i * 2)
+ * (float)Clock.ElapsedFrameTime
+ * 0.02f * rotationRandomness
+ // Each layer should alternate rotation direction.
+ * (i % 2 == 1 ? 1 : -1);
+ }
+ }
+ }
+}
diff --git a/osu.Game.Rulesets.Catch/Skinning/Argon/ArgonHitExplosion.cs b/osu.Game.Rulesets.Catch/Skinning/Argon/ArgonHitExplosion.cs
new file mode 100644
index 0000000000..a3c0c8c108
--- /dev/null
+++ b/osu.Game.Rulesets.Catch/Skinning/Argon/ArgonHitExplosion.cs
@@ -0,0 +1,112 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using System;
+using osu.Framework.Allocation;
+using osu.Framework.Bindables;
+using osu.Framework.Graphics;
+using osu.Framework.Graphics.Containers;
+using osu.Framework.Graphics.Effects;
+using osu.Framework.Graphics.Shapes;
+using osu.Framework.Utils;
+using osu.Game.Rulesets.Catch.Objects;
+using osu.Game.Rulesets.Catch.UI;
+using osuTK;
+using osuTK.Graphics;
+
+namespace osu.Game.Rulesets.Catch.Skinning.Argon
+{
+ public partial class ArgonHitExplosion : CompositeDrawable, IHitExplosion
+ {
+ public override bool RemoveWhenNotAlive => true;
+
+ private Container tallExplosion = null!;
+ private Container largeFaint = null!;
+
+ private readonly Bindable accentColour = new Bindable();
+
+ public ArgonHitExplosion()
+ {
+ Size = new Vector2(20);
+ Anchor = Anchor.BottomCentre;
+ Origin = Anchor.BottomCentre;
+ }
+
+ [BackgroundDependencyLoader]
+ private void load()
+ {
+ InternalChildren = new Drawable[]
+ {
+ tallExplosion = new Container
+ {
+ Anchor = Anchor.Centre,
+ Origin = Anchor.Centre,
+ RelativeSizeAxes = Axes.Both,
+ Masking = true,
+ Width = 0.1f,
+ Child = new Box
+ {
+ AlwaysPresent = true,
+ Alpha = 0,
+ RelativeSizeAxes = Axes.Both,
+ },
+ },
+ largeFaint = new Container
+ {
+ Anchor = Anchor.Centre,
+ Origin = Anchor.Centre,
+ RelativeSizeAxes = Axes.Both,
+ Masking = true,
+ Child = new Box
+ {
+ AlwaysPresent = true,
+ Alpha = 0,
+ RelativeSizeAxes = Axes.Both,
+ },
+ },
+ };
+
+ accentColour.BindValueChanged(colour =>
+ {
+ tallExplosion.EdgeEffect = new EdgeEffectParameters
+ {
+ Type = EdgeEffectType.Glow,
+ Colour = colour.NewValue,
+ Hollow = false,
+ Roundness = 15,
+ Radius = 15,
+ };
+
+ largeFaint.EdgeEffect = new EdgeEffectParameters
+ {
+ Type = EdgeEffectType.Glow,
+ Colour = Interpolation.ValueAt(0.2f, colour.NewValue, Color4.White, 0, 1),
+ Hollow = false,
+ Radius = 50,
+ };
+ }, true);
+ }
+
+ public void Animate(HitExplosionEntry entry)
+ {
+ X = entry.Position;
+ Scale = new Vector2(entry.HitObject.Scale);
+ accentColour.Value = entry.ObjectColour;
+
+ using (BeginAbsoluteSequence(entry.LifetimeStart))
+ {
+ this.FadeOutFromOne(400);
+
+ if (!(entry.HitObject is Droplet))
+ {
+ float scale = Math.Clamp(entry.JudgementResult.ComboAtJudgement / 200f, 0.35f, 1.125f);
+
+ tallExplosion
+ .ScaleTo(new Vector2(1.1f, 20 * scale), 200, Easing.OutQuint)
+ .Then()
+ .ScaleTo(new Vector2(1.1f, 1), 600, Easing.In);
+ }
+ }
+ }
+ }
+}
diff --git a/osu.Game.Rulesets.Catch/Skinning/Argon/CatchArgonSkinTransformer.cs b/osu.Game.Rulesets.Catch/Skinning/Argon/CatchArgonSkinTransformer.cs
new file mode 100644
index 0000000000..520c2de248
--- /dev/null
+++ b/osu.Game.Rulesets.Catch/Skinning/Argon/CatchArgonSkinTransformer.cs
@@ -0,0 +1,46 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using osu.Framework.Graphics;
+using osu.Game.Skinning;
+
+namespace osu.Game.Rulesets.Catch.Skinning.Argon
+{
+ public class CatchArgonSkinTransformer : SkinTransformer
+ {
+ public CatchArgonSkinTransformer(ISkin skin)
+ : base(skin)
+ {
+ }
+
+ public override Drawable? GetDrawableComponent(ISkinComponentLookup lookup)
+ {
+ switch (lookup)
+ {
+ case CatchSkinComponentLookup catchComponent:
+ // TODO: Once everything is finalised, consider throwing UnsupportedSkinComponentException on missing entries.
+ switch (catchComponent.Component)
+ {
+ case CatchSkinComponents.HitExplosion:
+ return new ArgonHitExplosion();
+
+ case CatchSkinComponents.Catcher:
+ return new ArgonCatcher();
+
+ case CatchSkinComponents.Fruit:
+ return new ArgonFruitPiece();
+
+ case CatchSkinComponents.Banana:
+ return new ArgonBananaPiece();
+
+ case CatchSkinComponents.Droplet:
+ return new ArgonDropletPiece();
+ }
+
+ break;
+ }
+
+ return base.GetDrawableComponent(lookup);
+ }
+ }
+}
diff --git a/osu.Game.Rulesets.Catch/Skinning/CatchSkinColour.cs b/osu.Game.Rulesets.Catch/Skinning/CatchSkinColour.cs
index d038ccb31c..4506111498 100644
--- a/osu.Game.Rulesets.Catch/Skinning/CatchSkinColour.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/CatchSkinColour.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
namespace osu.Game.Rulesets.Catch.Skinning
{
public enum CatchSkinColour
diff --git a/osu.Game.Rulesets.Catch/Skinning/CatchSkinConfiguration.cs b/osu.Game.Rulesets.Catch/Skinning/CatchSkinConfiguration.cs
index 65d6acd88d..ea8d742b1a 100644
--- a/osu.Game.Rulesets.Catch/Skinning/CatchSkinConfiguration.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/CatchSkinConfiguration.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
namespace osu.Game.Rulesets.Catch.Skinning
{
public enum CatchSkinConfiguration
diff --git a/osu.Game.Rulesets.Catch/Skinning/Default/BananaPiece.cs b/osu.Game.Rulesets.Catch/Skinning/Default/BananaPiece.cs
index 27252594af..80ee9d5a0c 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Default/BananaPiece.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Default/BananaPiece.cs
@@ -1,21 +1,19 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Graphics;
namespace osu.Game.Rulesets.Catch.Skinning.Default
{
- public class BananaPiece : CatchHitObjectPiece
+ public partial class BananaPiece : CatchHitObjectPiece
{
- protected override BorderPiece BorderPiece { get; }
+ protected override Drawable BorderPiece { get; }
public BananaPiece()
{
RelativeSizeAxes = Axes.Both;
- InternalChildren = new Drawable[]
+ InternalChildren = new[]
{
new BananaPulpFormation
{
diff --git a/osu.Game.Rulesets.Catch/Skinning/Default/BananaPulpFormation.cs b/osu.Game.Rulesets.Catch/Skinning/Default/BananaPulpFormation.cs
index ffeed80615..26c8558e74 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Default/BananaPulpFormation.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Default/BananaPulpFormation.cs
@@ -1,13 +1,11 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osuTK;
namespace osu.Game.Rulesets.Catch.Skinning.Default
{
- public class BananaPulpFormation : PulpFormation
+ public partial class BananaPulpFormation : PulpFormation
{
public BananaPulpFormation()
{
diff --git a/osu.Game.Rulesets.Catch/Skinning/Default/BorderPiece.cs b/osu.Game.Rulesets.Catch/Skinning/Default/BorderPiece.cs
index 60a13bee59..f0bdcfa1ba 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Default/BorderPiece.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Default/BorderPiece.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Game.Rulesets.Catch.Objects;
@@ -11,7 +9,7 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.Catch.Skinning.Default
{
- public class BorderPiece : Circle
+ public partial class BorderPiece : Circle
{
public BorderPiece()
{
diff --git a/osu.Game.Rulesets.Catch/Skinning/Default/CatchHitObjectPiece.cs b/osu.Game.Rulesets.Catch/Skinning/Default/CatchHitObjectPiece.cs
index 6cc5220699..7cc425966d 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Default/CatchHitObjectPiece.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Default/CatchHitObjectPiece.cs
@@ -1,38 +1,34 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System;
-using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
+using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Rulesets.Catch.Objects.Drawables;
using osuTK.Graphics;
namespace osu.Game.Rulesets.Catch.Skinning.Default
{
- public abstract class CatchHitObjectPiece : CompositeDrawable
+ public abstract partial class CatchHitObjectPiece : CompositeDrawable
{
public readonly Bindable AccentColour = new Bindable();
public readonly Bindable HyperDash = new Bindable();
public readonly Bindable IndexInBeatmap = new Bindable();
[Resolved]
- protected IHasCatchObjectState ObjectState { get; private set; }
+ protected IHasCatchObjectState ObjectState { get; private set; } = null!;
///
/// A part of this piece that will be faded out while falling in the playfield.
///
- [CanBeNull]
- protected virtual BorderPiece BorderPiece => null;
+ protected virtual Drawable? BorderPiece => null;
///
/// A part of this piece that will be only visible when is true.
///
- [CanBeNull]
- protected virtual HyperBorderPiece HyperBorderPiece => null;
+ protected virtual Drawable? HyperBorderPiece => null;
protected override void LoadComplete()
{
diff --git a/osu.Game.Rulesets.Catch/Skinning/Default/DefaultCatcher.cs b/osu.Game.Rulesets.Catch/Skinning/Default/DefaultCatcher.cs
index 4148fed11c..72208b763b 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Default/DefaultCatcher.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Default/DefaultCatcher.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
@@ -14,7 +12,7 @@ using osu.Game.Rulesets.Catch.UI;
namespace osu.Game.Rulesets.Catch.Skinning.Default
{
- public class DefaultCatcher : CompositeDrawable
+ public partial class DefaultCatcher : CompositeDrawable
{
public Bindable CurrentState { get; } = new Bindable();
diff --git a/osu.Game.Rulesets.Catch/Skinning/Default/DefaultHitExplosion.cs b/osu.Game.Rulesets.Catch/Skinning/Default/DefaultHitExplosion.cs
index 7ea99b3ed9..3af178fe4d 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Default/DefaultHitExplosion.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Default/DefaultHitExplosion.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
@@ -16,12 +14,12 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.Catch.Skinning.Default
{
- public class DefaultHitExplosion : CompositeDrawable, IHitExplosion
+ public partial class DefaultHitExplosion : CompositeDrawable, IHitExplosion
{
- private CircularContainer largeFaint;
- private CircularContainer smallFaint;
- private CircularContainer directionalGlow1;
- private CircularContainer directionalGlow2;
+ private CircularContainer largeFaint = null!;
+ private CircularContainer smallFaint = null!;
+ private CircularContainer directionalGlow1 = null!;
+ private CircularContainer directionalGlow2 = null!;
[BackgroundDependencyLoader]
private void load()
diff --git a/osu.Game.Rulesets.Catch/Skinning/Default/DropletPiece.cs b/osu.Game.Rulesets.Catch/Skinning/Default/DropletPiece.cs
index 6b7f25eed1..f002457b61 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Default/DropletPiece.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Default/DropletPiece.cs
@@ -1,23 +1,21 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Graphics;
using osu.Game.Rulesets.Catch.Objects;
using osuTK;
namespace osu.Game.Rulesets.Catch.Skinning.Default
{
- public class DropletPiece : CatchHitObjectPiece
+ public partial class DropletPiece : CatchHitObjectPiece
{
- protected override HyperBorderPiece HyperBorderPiece { get; }
+ protected override Drawable HyperBorderPiece { get; }
public DropletPiece()
{
Size = new Vector2(CatchHitObject.OBJECT_RADIUS / 2);
- InternalChildren = new Drawable[]
+ InternalChildren = new[]
{
new Pulp
{
diff --git a/osu.Game.Rulesets.Catch/Skinning/Default/FruitPiece.cs b/osu.Game.Rulesets.Catch/Skinning/Default/FruitPiece.cs
index 8fb5c8f84a..31e30d8073 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Default/FruitPiece.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Default/FruitPiece.cs
@@ -1,15 +1,13 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Catch.Objects;
namespace osu.Game.Rulesets.Catch.Skinning.Default
{
- internal class FruitPiece : CatchHitObjectPiece
+ internal partial class FruitPiece : CatchHitObjectPiece
{
///
/// Because we're adding a border around the fruit, we need to scale down some.
@@ -18,14 +16,14 @@ namespace osu.Game.Rulesets.Catch.Skinning.Default
public readonly Bindable VisualRepresentation = new Bindable();
- protected override BorderPiece BorderPiece { get; }
- protected override HyperBorderPiece HyperBorderPiece { get; }
+ protected override Drawable BorderPiece { get; }
+ protected override Drawable HyperBorderPiece { get; }
public FruitPiece()
{
RelativeSizeAxes = Axes.Both;
- InternalChildren = new Drawable[]
+ InternalChildren = new[]
{
new FruitPulpFormation
{
diff --git a/osu.Game.Rulesets.Catch/Skinning/Default/FruitPulpFormation.cs b/osu.Game.Rulesets.Catch/Skinning/Default/FruitPulpFormation.cs
index db51195f11..c031e50e34 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Default/FruitPulpFormation.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Default/FruitPulpFormation.cs
@@ -1,15 +1,13 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Bindables;
using osu.Game.Rulesets.Catch.Objects;
using osuTK;
namespace osu.Game.Rulesets.Catch.Skinning.Default
{
- public class FruitPulpFormation : PulpFormation
+ public partial class FruitPulpFormation : PulpFormation
{
public readonly Bindable VisualRepresentation = new Bindable();
diff --git a/osu.Game.Rulesets.Catch/Skinning/Default/HyperBorderPiece.cs b/osu.Game.Rulesets.Catch/Skinning/Default/HyperBorderPiece.cs
index 42b0b85495..c025c8e435 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Default/HyperBorderPiece.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Default/HyperBorderPiece.cs
@@ -1,14 +1,12 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Graphics;
using osu.Game.Rulesets.Catch.UI;
namespace osu.Game.Rulesets.Catch.Skinning.Default
{
- public class HyperBorderPiece : BorderPiece
+ public partial class HyperBorderPiece : BorderPiece
{
public HyperBorderPiece()
{
diff --git a/osu.Game.Rulesets.Catch/Skinning/Default/HyperDropletBorderPiece.cs b/osu.Game.Rulesets.Catch/Skinning/Default/HyperDropletBorderPiece.cs
index 29cb339625..1462bc3515 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Default/HyperDropletBorderPiece.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Default/HyperDropletBorderPiece.cs
@@ -1,11 +1,9 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
namespace osu.Game.Rulesets.Catch.Skinning.Default
{
- public class HyperDropletBorderPiece : HyperBorderPiece
+ public partial class HyperDropletBorderPiece : HyperBorderPiece
{
public HyperDropletBorderPiece()
{
diff --git a/osu.Game.Rulesets.Catch/Skinning/Default/Pulp.cs b/osu.Game.Rulesets.Catch/Skinning/Default/Pulp.cs
index 8ea54617d9..4b4d6f3788 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Default/Pulp.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Default/Pulp.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
@@ -12,7 +10,7 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.Catch.Skinning.Default
{
- public class Pulp : Circle
+ public partial class Pulp : Circle
{
public readonly Bindable AccentColour = new Bindable();
diff --git a/osu.Game.Rulesets.Catch/Skinning/Default/PulpFormation.cs b/osu.Game.Rulesets.Catch/Skinning/Default/PulpFormation.cs
index aa5ef5fb66..21502e6fa0 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Default/PulpFormation.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Default/PulpFormation.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
@@ -12,7 +10,7 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.Catch.Skinning.Default
{
- public abstract class PulpFormation : CompositeDrawable
+ public abstract partial class PulpFormation : CompositeDrawable
{
public readonly Bindable AccentColour = new Bindable();
diff --git a/osu.Game.Rulesets.Catch/Skinning/Legacy/CatchLegacySkinTransformer.cs b/osu.Game.Rulesets.Catch/Skinning/Legacy/CatchLegacySkinTransformer.cs
index a73b34c9b6..fb8af9bdb6 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Legacy/CatchLegacySkinTransformer.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Legacy/CatchLegacySkinTransformer.cs
@@ -1,11 +1,10 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using System.Linq;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
+using osu.Framework.Graphics.Containers;
using osu.Game.Skinning;
using osuTK.Graphics;
@@ -27,14 +26,14 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
{
}
- public override Drawable GetDrawableComponent(ISkinComponent component)
+ public override Drawable? GetDrawableComponent(ISkinComponentLookup lookup)
{
- if (component is SkinnableTargetComponent targetComponent)
+ if (lookup is SkinComponentsContainerLookup containerLookup)
{
- switch (targetComponent.Target)
+ switch (containerLookup.Target)
{
- case SkinnableTarget.MainHUDComponents:
- var components = base.GetDrawableComponent(component) as SkinnableTargetComponentsContainer;
+ case SkinComponentsContainerLookup.TargetArea.MainHUDComponents:
+ var components = base.GetDrawableComponent(lookup) as Container;
if (providesComboCounter && components != null)
{
@@ -48,7 +47,7 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
}
}
- if (component is CatchSkinComponent catchSkinComponent)
+ if (lookup is CatchSkinComponentLookup catchSkinComponent)
{
switch (catchSkinComponent.Component)
{
@@ -97,11 +96,11 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
return null;
default:
- throw new UnsupportedSkinComponentException(component);
+ throw new UnsupportedSkinComponentException(lookup);
}
}
- return base.GetDrawableComponent(component);
+ return base.GetDrawableComponent(lookup);
}
private bool hasOldStyleCatcherSprite() =>
@@ -112,12 +111,12 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
GetTexture(@"fruit-catcher-idle") != null
|| GetTexture(@"fruit-catcher-idle-0") != null;
- public override IBindable GetConfig(TLookup lookup)
+ public override IBindable? GetConfig(TLookup lookup)
{
switch (lookup)
{
case CatchSkinColour colour:
- var result = (Bindable)base.GetConfig(new SkinCustomColourLookup(colour));
+ var result = (Bindable?)base.GetConfig(new SkinCustomColourLookup(colour));
if (result == null)
return null;
@@ -129,7 +128,7 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
{
case CatchSkinConfiguration.FlipCatcherPlate:
// Don't flip catcher plate contents if the catcher is provided by this legacy skin.
- if (GetDrawableComponent(new CatchSkinComponent(CatchSkinComponents.Catcher)) != null)
+ if (GetDrawableComponent(new CatchSkinComponentLookup(CatchSkinComponents.Catcher)) != null)
return (IBindable)new Bindable();
break;
diff --git a/osu.Game.Rulesets.Catch/Skinning/Legacy/LegacyBananaPiece.cs b/osu.Game.Rulesets.Catch/Skinning/Legacy/LegacyBananaPiece.cs
index 9f64a2129e..26832b7271 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Legacy/LegacyBananaPiece.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Legacy/LegacyBananaPiece.cs
@@ -1,20 +1,18 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Graphics.Textures;
namespace osu.Game.Rulesets.Catch.Skinning.Legacy
{
- public class LegacyBananaPiece : LegacyCatchHitObjectPiece
+ public partial class LegacyBananaPiece : LegacyCatchHitObjectPiece
{
protected override void LoadComplete()
{
base.LoadComplete();
- Texture texture = Skin.GetTexture("fruit-bananas");
- Texture overlayTexture = Skin.GetTexture("fruit-bananas-overlay");
+ Texture? texture = Skin.GetTexture("fruit-bananas");
+ Texture? overlayTexture = Skin.GetTexture("fruit-bananas-overlay");
SetTexture(texture, overlayTexture);
}
diff --git a/osu.Game.Rulesets.Catch/Skinning/Legacy/LegacyCatchComboCounter.cs b/osu.Game.Rulesets.Catch/Skinning/Legacy/LegacyCatchComboCounter.cs
index b4d29988d9..eba837a52d 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Legacy/LegacyCatchComboCounter.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Legacy/LegacyCatchComboCounter.cs
@@ -13,7 +13,7 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
///
/// A combo counter implementation that visually behaves almost similar to stable's osu!catch combo counter.
///
- public class LegacyCatchComboCounter : CompositeDrawable, ICatchComboCounter
+ public partial class LegacyCatchComboCounter : CompositeDrawable, ICatchComboCounter
{
private readonly LegacyRollingCounter counter;
diff --git a/osu.Game.Rulesets.Catch/Skinning/Legacy/LegacyCatchHitObjectPiece.cs b/osu.Game.Rulesets.Catch/Skinning/Legacy/LegacyCatchHitObjectPiece.cs
index 5a5288105d..2184ecc363 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Legacy/LegacyCatchHitObjectPiece.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Legacy/LegacyCatchHitObjectPiece.cs
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-#nullable disable
-
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
@@ -17,21 +15,22 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.Catch.Skinning.Legacy
{
- public abstract class LegacyCatchHitObjectPiece : PoolableDrawable
+ public abstract partial class LegacyCatchHitObjectPiece : PoolableDrawable
{
- public readonly Bindable