mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
move variables to StoryboardDecoder
This commit is contained in:
@ -8,7 +8,6 @@ using OpenTK.Graphics;
|
||||
using osu.Game.Beatmaps.Timing;
|
||||
using osu.Game.Rulesets.Objects.Legacy;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Beatmaps.Formats
|
||||
{
|
||||
@ -82,9 +81,6 @@ namespace osu.Game.Beatmaps.Formats
|
||||
case Section.HitObjects:
|
||||
handleHitObjects(line);
|
||||
break;
|
||||
case Section.Variables:
|
||||
handleVariables(line);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -242,8 +238,6 @@ namespace osu.Game.Beatmaps.Formats
|
||||
|
||||
private void handleEvents(string line)
|
||||
{
|
||||
DecodeVariables(ref line);
|
||||
|
||||
string[] split = line.Split(',');
|
||||
|
||||
EventType type;
|
||||
@ -400,22 +394,5 @@ namespace osu.Game.Beatmaps.Formats
|
||||
if (obj != null)
|
||||
beatmap.HitObjects.Add(obj);
|
||||
}
|
||||
|
||||
private void handleVariables(string line)
|
||||
{
|
||||
var pair = splitKeyVal(line, '=');
|
||||
Variables[pair.Key] = pair.Value;
|
||||
}
|
||||
|
||||
private KeyValuePair<string, string> splitKeyVal(string line, char separator)
|
||||
{
|
||||
var split = line.Trim().Split(new[] { separator }, 2);
|
||||
|
||||
return new KeyValuePair<string, string>
|
||||
(
|
||||
split[0].Trim(),
|
||||
split.Length > 1 ? split[1].Trim() : string.Empty
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user