Allow variables of variables

Some storyboards like to do tricky stuff
This commit is contained in:
ColdVolcano
2017-05-27 00:13:46 -05:00
parent 0b770d1225
commit a523dfc388

View File

@ -32,7 +32,7 @@ namespace osu.Game.Beatmaps.Formats
private ConvertHitObjectParser parser; private ConvertHitObjectParser parser;
private Dictionary<string, string> variables = new Dictionary<string, string>(); private readonly Dictionary<string, string> variables = new Dictionary<string, string>();
private LegacySampleBank defaultSampleBank; private LegacySampleBank defaultSampleBank;
private int defaultSampleVolume = 100; private int defaultSampleVolume = 100;
@ -415,6 +415,8 @@ namespace osu.Game.Beatmaps.Formats
handleDifficulty(beatmap, key, val); handleDifficulty(beatmap, key, val);
break; break;
case Section.Events: case Section.Events:
do
{
string[] valSplit = val.Split(','); string[] valSplit = val.Split(',');
for (int i = 0; i < valSplit.Length; i++) for (int i = 0; i < valSplit.Length; i++)
{ {
@ -422,6 +424,7 @@ namespace osu.Game.Beatmaps.Formats
valSplit[i] = variables[valSplit[i]]; valSplit[i] = variables[valSplit[i]];
} }
val = string.Join(",", valSplit); val = string.Join(",", valSplit);
} while (val.IndexOf('$') != -1);
handleEvents(beatmap, val); handleEvents(beatmap, val);
break; break;
case Section.TimingPoints: case Section.TimingPoints: