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

[pull] master from ppy:master #181

Open
wants to merge 10,000 commits into
base: master
Choose a base branch
from
Open

[pull] master from ppy:master #181

wants to merge 10,000 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented Jun 16, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Jun 16, 2021
bdach and others added 29 commits June 18, 2024 10:41
and fixed one minor CI code quality thing
Display breaks on editor timeline & allow manually adjusting their duration
CodeFileSanity doesn't like records and it being a record wasn't doing
much anymore anyway.
frenzibyte and others added 30 commits July 4, 2024 07:28
Add verify checks for incorrect title markers
Reimplement missing gameplay test hotkeys from stable
Add ability to cycle slider control point types via keyboard
Change editor speed adjustment back to adjusting tempo
Fix editor not updating ruleset when switching difficulty
Always inherit the volume from the previous hit object on placement
Use room watching functionality to receive realtime daily challenge updates
Fix incorrect skin fallback order when beatmap skin is present
Disappeared in latest EAP and doesn't look like something we would have
wanted to be committed in the first place.
Allow inheriting addition bank from previous hitobject when using auto bank assignment
Fix node samples always having default samples on placement
Closes #28741.

Regressed in a7b066f.

The intent of the original change there was to ensure that addition
banks being set will put the ternary state toggles in indeterminate
state (to at least provide a visual indication that the selection does
not use a single bank). This would previously not be the case due to
the use of `.All()` in the original condition (a single object/node
was considered to have a bank enabled if and only if *all* samples
within it used it). However the attempt to fix that via switching
to `Any()` was not correct.

The logic used in the offending commit operates on extracted `Samples`
and `NodeSamples` from the selection, and would consider the ternary
toggle:

- fully off if none of the samples/node samples contained a sample with
  the given bank,
- indeterminate if the some of the samples/node samples contained a
  sample with the given bank,
- fully on if at least one sample from every samples/node samples
  contained a sample with the given bank.

This is a *two-tiered* process, as in first a *binary* on/off state is
extracted from each object's samples/node samples, and *then* a ternary
state is extracted from all objects/nodes. This is insufficient to
express the *desired* behaviour, which is that the toggle should be:

- fully off if *none of the individual samples in the selection* use
  the given bank,
- indeterminate if *at least one individual sample in the selection*
  uses the given bank,
- fully on if *all individual samples in the selection* use the given
  bank.

The second wording is flattened, and no longer tries to consider "nodes"
or "objects", it just looks at all of the samples in the selection
without concern as to whether they're from separate objects/nodes
or not.

To explain why this discrepancy caused the bug, consider a single object
with a `soft` normal bank and `drum` addition bank. Selecting the object
would cause a ternary button state update; as per the incorrect logic,
there were two samples on the object and each had its own separate
banks, so two ternary toggles would have their state set to `True`
(rather than the correct `Indeterminate`), thus triggering a bindable
feedback loop that would cause one of these banks to win and actually
overwrite the other.

Note that the addition indeterminate state computation *still* needs
to do the two-tiered process, because there it actually makes sense (for
a selection to have an addition fully on rather than indeterminate,
*every* object/node *must* contain that addition).
Fix incorrect ternary state computation for bank toggles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet