Skip to content

Commit e91ccd5

Browse files
committed
Add a little more verbose logging to track MAS_SUB_PAGE loads
1 parent 145c35c commit e91ccd5

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Properties/SharedAssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
//
1212
// You can specify all the values or you can default the Build and Revision Numbers
1313
// by using the '*' as shown below:
14-
[assembly: AssemblyVersion("1.3.4.*")]
14+
[assembly: AssemblyVersion("1.3.5.*")]
1515
//[assembly: AssemblyFileVersion("1.0.0.0")]

Source/MASLoader.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*****************************************************************************
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2016-2020 MOARdV
4+
* Copyright (c) 2016-2022 MOARdV
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to
@@ -762,7 +762,7 @@ private void LoadAssets()
762762
AudioClip clip = GameDatabase.Instance.GetAudioClip(val.value);
763763
if (clip == null)
764764
{
765-
Utility.LogError(this, "Could not load audio clip {0} for morse code '{1}", val.value, val.name);
765+
Utility.LogError(this, "Could not load audio clip {0} for morse code '{1}'", val.value, val.name);
766766
}
767767
else
768768
{
@@ -779,12 +779,15 @@ private void LoadAssets()
779779
string subPageName = string.Empty;
780780
if (subPageNode[subPageIdx].TryGetValue("name", ref subPageName))
781781
{
782+
subPageName = subPageName.Trim();
783+
782784
List<ConfigNode> subPageNodes = new List<ConfigNode>();
783785
ConfigNode[] nodes = subPageNode[subPageIdx].GetNodes();
784786

785787
subPageNodes.AddRange(nodes);
786788

787789
subPages.Add(subPageName, subPageNodes);
790+
Utility.LogMessage(this, "Found MAS_SUB_PAGE \"{0}\"", subPageName);
788791
}
789792
else
790793
{

Source/MASPage.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*****************************************************************************
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2016-2019 MOARdV
4+
* Copyright (c) 2016-2022 MOARdV
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to
@@ -366,6 +366,7 @@ private List<ConfigNode> ResolveSubPage(ConfigNode subPageNode, Vector2 fontSize
366366
{
367367
throw new ArgumentException("No 'name' field in SUB_PAGE found in MASPage " + name);
368368
}
369+
subPageName = subPageName.Trim();
369370

370371
// Test for 'variable'
371372
string variableString = string.Empty;
@@ -390,7 +391,7 @@ private List<ConfigNode> ResolveSubPage(ConfigNode subPageNode, Vector2 fontSize
390391
List<ConfigNode> subPageNodes;
391392
if (!MASLoader.subPages.TryGetValue(subPageName, out subPageNodes))
392393
{
393-
throw new ArgumentException("Unable to find MAS_SUB_PAGE '" + subPageName + "' for SUB_PAGE found in MASPage " + name);
394+
throw new ArgumentException("Unable to find MAS_SUB_PAGE '" + subPageName + "' for a SUB_PAGE in MASPage " + name);
394395
}
395396
List<ConfigNode> newNodes = new List<ConfigNode>();
396397

0 commit comments

Comments
 (0)