mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 22:33:05 +08:00
Standardise column index naming and xmldoc
This commit is contained in:
parent
13e0a59f70
commit
eea3d5adb8
@ -16,8 +16,9 @@ namespace osu.Game.Rulesets.Mania.Skinning
|
||||
public readonly LegacyManiaSkinConfigurationLookups Lookup;
|
||||
|
||||
/// <summary>
|
||||
/// The intended <see cref="Column"/> index for the configuration.
|
||||
/// The column which is being looked up.
|
||||
/// May be null if the configuration does not apply to a <see cref="Column"/>.
|
||||
/// Note that this is the absolute index across all stages.
|
||||
/// </summary>
|
||||
public readonly int? ColumnIndex;
|
||||
|
||||
|
@ -15,15 +15,20 @@ namespace osu.Game.Skinning
|
||||
/// </summary>
|
||||
public readonly int TotalColumns;
|
||||
|
||||
public readonly int? TargetColumn;
|
||||
/// <summary>
|
||||
/// The column which is being looked up.
|
||||
/// May be null if the configuration does not apply to a specific column.
|
||||
/// Note that this is the absolute index across all stages.
|
||||
/// </summary>
|
||||
public readonly int? ColumnIndex;
|
||||
|
||||
public readonly LegacyManiaSkinConfigurationLookups Lookup;
|
||||
|
||||
public LegacyManiaSkinConfigurationLookup(int totalColumns, LegacyManiaSkinConfigurationLookups lookup, int? targetColumn = null)
|
||||
public LegacyManiaSkinConfigurationLookup(int totalColumns, LegacyManiaSkinConfigurationLookups lookup, int? columnIndex = null)
|
||||
{
|
||||
TotalColumns = totalColumns;
|
||||
Lookup = lookup;
|
||||
TargetColumn = targetColumn;
|
||||
ColumnIndex = columnIndex;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -134,12 +134,12 @@ namespace osu.Game.Skinning
|
||||
switch (maniaLookup.Lookup)
|
||||
{
|
||||
case LegacyManiaSkinConfigurationLookups.ColumnWidth:
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.ColumnWidth[maniaLookup.TargetColumn.Value]));
|
||||
Debug.Assert(maniaLookup.ColumnIndex != null);
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.ColumnWidth[maniaLookup.ColumnIndex.Value]));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.ColumnSpacing:
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.ColumnSpacing[maniaLookup.TargetColumn.Value]));
|
||||
Debug.Assert(maniaLookup.ColumnIndex != null);
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.ColumnSpacing[maniaLookup.ColumnIndex.Value]));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.HitPosition:
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.HitPosition));
|
||||
@ -157,15 +157,15 @@ namespace osu.Game.Skinning
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, "LightingN"));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.ExplosionScale:
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
Debug.Assert(maniaLookup.ColumnIndex != null);
|
||||
|
||||
if (GetConfig<SkinConfiguration.LegacySetting, decimal>(SkinConfiguration.LegacySetting.Version)?.Value < 2.5m)
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(1));
|
||||
|
||||
if (existing.ExplosionWidth[maniaLookup.TargetColumn.Value] != 0)
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.ExplosionWidth[maniaLookup.TargetColumn.Value] / LegacyManiaSkinConfiguration.DEFAULT_COLUMN_SIZE));
|
||||
if (existing.ExplosionWidth[maniaLookup.ColumnIndex.Value] != 0)
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.ExplosionWidth[maniaLookup.ColumnIndex.Value] / LegacyManiaSkinConfiguration.DEFAULT_COLUMN_SIZE));
|
||||
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.ColumnWidth[maniaLookup.TargetColumn.Value] / LegacyManiaSkinConfiguration.DEFAULT_COLUMN_SIZE));
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.ColumnWidth[maniaLookup.ColumnIndex.Value] / LegacyManiaSkinConfiguration.DEFAULT_COLUMN_SIZE));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.ColumnLineColour:
|
||||
return SkinUtils.As<TValue>(getCustomColour(existing, "ColourColumnLine"));
|
||||
@ -174,53 +174,53 @@ namespace osu.Game.Skinning
|
||||
return SkinUtils.As<TValue>(getCustomColour(existing, "ColourJudgementLine"));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.ColumnBackgroundColour:
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
return SkinUtils.As<TValue>(getCustomColour(existing, $"Colour{maniaLookup.TargetColumn + 1}"));
|
||||
Debug.Assert(maniaLookup.ColumnIndex != null);
|
||||
return SkinUtils.As<TValue>(getCustomColour(existing, $"Colour{maniaLookup.ColumnIndex + 1}"));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.ColumnLightColour:
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
return SkinUtils.As<TValue>(getCustomColour(existing, $"ColourLight{maniaLookup.TargetColumn + 1}"));
|
||||
Debug.Assert(maniaLookup.ColumnIndex != null);
|
||||
return SkinUtils.As<TValue>(getCustomColour(existing, $"ColourLight{maniaLookup.ColumnIndex + 1}"));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.MinimumColumnWidth:
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.MinimumColumnWidth));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.NoteImage:
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, $"NoteImage{maniaLookup.TargetColumn}"));
|
||||
Debug.Assert(maniaLookup.ColumnIndex != null);
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, $"NoteImage{maniaLookup.ColumnIndex}"));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.HoldNoteHeadImage:
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, $"NoteImage{maniaLookup.TargetColumn}H"));
|
||||
Debug.Assert(maniaLookup.ColumnIndex != null);
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, $"NoteImage{maniaLookup.ColumnIndex}H"));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.HoldNoteTailImage:
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, $"NoteImage{maniaLookup.TargetColumn}T"));
|
||||
Debug.Assert(maniaLookup.ColumnIndex != null);
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, $"NoteImage{maniaLookup.ColumnIndex}T"));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.HoldNoteBodyImage:
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, $"NoteImage{maniaLookup.TargetColumn}L"));
|
||||
Debug.Assert(maniaLookup.ColumnIndex != null);
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, $"NoteImage{maniaLookup.ColumnIndex}L"));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.HoldNoteLightImage:
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, "LightingL"));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.HoldNoteLightScale:
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
Debug.Assert(maniaLookup.ColumnIndex != null);
|
||||
|
||||
if (GetConfig<SkinConfiguration.LegacySetting, decimal>(SkinConfiguration.LegacySetting.Version)?.Value < 2.5m)
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(1));
|
||||
|
||||
if (existing.HoldNoteLightWidth[maniaLookup.TargetColumn.Value] != 0)
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.HoldNoteLightWidth[maniaLookup.TargetColumn.Value] / LegacyManiaSkinConfiguration.DEFAULT_COLUMN_SIZE));
|
||||
if (existing.HoldNoteLightWidth[maniaLookup.ColumnIndex.Value] != 0)
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.HoldNoteLightWidth[maniaLookup.ColumnIndex.Value] / LegacyManiaSkinConfiguration.DEFAULT_COLUMN_SIZE));
|
||||
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.ColumnWidth[maniaLookup.TargetColumn.Value] / LegacyManiaSkinConfiguration.DEFAULT_COLUMN_SIZE));
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.ColumnWidth[maniaLookup.ColumnIndex.Value] / LegacyManiaSkinConfiguration.DEFAULT_COLUMN_SIZE));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.KeyImage:
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, $"KeyImage{maniaLookup.TargetColumn}"));
|
||||
Debug.Assert(maniaLookup.ColumnIndex != null);
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, $"KeyImage{maniaLookup.ColumnIndex}"));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.KeyImageDown:
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, $"KeyImage{maniaLookup.TargetColumn}D"));
|
||||
Debug.Assert(maniaLookup.ColumnIndex != null);
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, $"KeyImage{maniaLookup.ColumnIndex}D"));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.LeftStageImage:
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, "StageLeft"));
|
||||
@ -238,12 +238,12 @@ namespace osu.Game.Skinning
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, "StageHint"));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.LeftLineWidth:
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.ColumnLineWidth[maniaLookup.TargetColumn.Value]));
|
||||
Debug.Assert(maniaLookup.ColumnIndex != null);
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.ColumnLineWidth[maniaLookup.ColumnIndex.Value]));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.RightLineWidth:
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.ColumnLineWidth[maniaLookup.TargetColumn.Value + 1]));
|
||||
Debug.Assert(maniaLookup.ColumnIndex != null);
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.ColumnLineWidth[maniaLookup.ColumnIndex.Value + 1]));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.Hit0:
|
||||
case LegacyManiaSkinConfigurationLookups.Hit50:
|
||||
|
Loading…
Reference in New Issue
Block a user