Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add ability to clone objects in the editor #20901

Merged
merged 7 commits into from
Oct 25, 2022

Conversation

peppy
Copy link
Member

@peppy peppy commented Oct 24, 2022

A bit of a low-effort implementation, but I'd like to push this out and see what kind of feedback mappers have. The implementation in stable is a bit nuanced, and may be preferred in some cases and potentially not in others. I think stable's behaviour is probably better when the current time is equal to the start time of the pattern being copied, but if the current time point is already in the future, it should work as per this PR's implementation?

One more thing: I'm not sure whether we should call this "clone" or "duplicate" when exposing to the user. I went with "duplicate" to avoid method clashes with object.Clone but I think "clone" may be more standard a term to users?

To make this work, I have reordered how bindings are handled at a game-wide level. Now, top level overlay bindings are giving less precedence than all local usages. I think this makes more sense (discussed with @smoogipoo and he tends to agree).

Closes #20860.

smoogipoo
smoogipoo previously approved these changes Oct 24, 2022
@peppy
Copy link
Member Author

peppy commented Oct 25, 2022

I've fixed the issue pointed out and added test coverage.

I've also renamed to "Clone" as I think it reads better.

Copy link
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed up one more remaining case of "duplicate" vernacular remaining (f5ca447). Looks good to go otherwise.

Comment on lines +41 to +44
// Overlay bindings may conflict with more local cases like the editor so they are checked last.
// It has generally been agreed on that local screens like the editor should have priority,
// based on such usages potentially requiring a lot more key bindings that may be "shared" with global ones.
.Concat(OverlayKeyBindings);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's hoping we have good test coverage and/or this one doesn't wreak too much havoc, because I'm not manually checking every single binding...

@bdach bdach enabled auto-merge October 25, 2022 19:42
@bdach bdach merged commit 181c7d1 into ppy:master Oct 25, 2022
@peppy peppy deleted the add-editor-object-clone branch October 27, 2022 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ctrl+D brings up beatmap listing instead of duplicating
3 participants