mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-15 06:05:10 +00:00
don't crash if origin is undefined (#514)
reword the unknown origin message to be less scary
This commit is contained in:
parent
6e3f4d4252
commit
5139722f0e
1 changed files with 3 additions and 1 deletions
|
@ -259,7 +259,9 @@ namespace HeavenStudio
|
|||
Debug.Log(Beatmap.data.riqOrigin);
|
||||
if (Beatmap.data.riqOrigin != "HeavenStudio")
|
||||
{
|
||||
GlobalGameManager.ShowErrorMessage("Warning", "This chart was made for another game,\nand thus may not be playable in Heaven Studio.\n<color=\"yellow\">You may be able to edit this chart in Heaven Studio to be used in its original game.</color>\n\n<alpha=#AA>Chart Origin: " + Beatmap.data.riqOrigin.DisplayName());
|
||||
string origin = Beatmap.data.riqOrigin?.DisplayName() ?? "Unknown Origin";
|
||||
GlobalGameManager.ShowErrorMessage("Warning",
|
||||
$"This chart came from\n<alpha=#AA>{origin}</color>\nand uses content not included in Heaven Studio.\n\n<color=\"yellow\">You may be able to edit this chart in Heaven Studio to be used in its original program.</color>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue