Skip to content

Commit

Permalink
Fix #10
Browse files Browse the repository at this point in the history
- Other clean-up
  • Loading branch information
AaronCRobinson committed Sep 26, 2018
1 parent 6b94072 commit de3cb08
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions About/ModSync.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<ModSyncNinjaData>
<ID>52eabdf5-040a-4cf6-a754-2264a68e2712</ID>
<ModName>BetterMiniMap</ModName>
<Version>0.19.2</Version>
<Version>0.19.3</Version>
<SaveBreaking>False</SaveBreaking>
<Host name="Direct">
<AboutUri>https://raw.githubusercontent.com/RimWorld-CCL-Reborn/BetterMiniMap/master/About/About.xml</AboutUri>
<ModSyncUri>https://raw.githubusercontent.com/RimWorld-CCL-Reborn/BetterMiniMap/master/About/ModSync.xml</ModSyncUri>
<DownloadUri>https://github.com/RimWorld-CCL-Reborn/BetterMiniMap/releases/tag/v0.19.2</DownloadUri>
<DownloadUri>https://github.com/RimWorld-CCL-Reborn/BetterMiniMap/releases/tag/v0.19.3</DownloadUri>
</Host>
</ModSyncNinjaData>
Binary file modified Assemblies/BetterMiniMap.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion Defs/OverlayDefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<label>Fires</label>
<priority>975</priority>
<description>This overlay shows any crashed ships that have landed on the map</description>
<disabled>true</disabled>
<visible>false</visible>
<overlayClass>BetterMiniMap.Overlays.ThingOverlay</overlayClass>
<updatePeriod>360</updatePeriod>
<requestGroup>Fire</requestGroup> <!-- returns all -->
Expand Down
2 changes: 1 addition & 1 deletion Source/BetterMiniMap/MiniMapWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ internal class MiniMapWindow : Window, IExposable
private const int defaultMargin = 8;
private const float scrollWheelZoomRate = 0.015f;

private List<Overlay> overlays;
private readonly List<Overlay> overlays;

private int tileHash = 0;

Expand Down
6 changes: 3 additions & 3 deletions Source/BetterMiniMap/OverlayDef.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class OverlayDef : Def
public int updatePeriod;
public List<Selector> selectors;
public IndicatorMappings indicatorMappings;
public bool disabled;
public bool visible = true;
public ThingRequestGroup requestGroup; // should be not null for ThingOverlay
public int priority = 0;

Expand All @@ -69,9 +69,9 @@ public void LoadDataFromXmlCustom(XmlNode xmlRoot)
if (node != null)
this.priority = Verse.DirectXmlToObject.ObjectFromXml<int>(node, true);

node = xmlRoot.SelectSingleNode("disabled");
node = xmlRoot.SelectSingleNode("visible");
if (node != null)
this.disabled = Verse.DirectXmlToObject.ObjectFromXml<bool>(node, true);
this.visible = Verse.DirectXmlToObject.ObjectFromXml<bool>(node, true);

node = xmlRoot.SelectSingleNode("selectors");
if (this.ValidateClasses(node))
Expand Down
2 changes: 1 addition & 1 deletion Source/BetterMiniMap/OverlayManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static OverlayManager()

Log.Message($"OverlayManager.cctor: {def.defName} -> {def.disabled}");
#endif
Overlay overlay = (Overlay)Activator.CreateInstance(def.overlayClass, new object[] {def, !def.disabled});
Overlay overlay = (Overlay)Activator.CreateInstance(def.overlayClass, new object[] {def, def.visible});
OverlayManager.DefOverlays.Add(overlay);
}
// add tracking for settings
Expand Down

0 comments on commit de3cb08

Please sign in to comment.