Skip to content

Commit 53c5947

Browse files
committed
science map extensions
1 parent 6736913 commit 53c5947

File tree

16 files changed

+846
-404
lines changed

16 files changed

+846
-404
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
globalNode
2+
{
3+
Heightmap
4+
{
5+
Alpha = 100
6+
}
7+
Biomemap
8+
{
9+
Alpha = 100
10+
}
11+
ResourceOverlay
12+
{
13+
ActiveResource
14+
{
15+
Karbonite
16+
{
17+
Resource = ResourceName=Karbonite,ScansatName=Karbonite
18+
LowColor = (0,0,0,0)
19+
HighColor = (255,0,0,200)
20+
}
21+
}
22+
colorConfigs
23+
{
24+
Karbonite
25+
{
26+
Resource = ResourceName=Karbonite,ScansatName=Karbonite
27+
LowColor = (0,0,0,0)
28+
HighColor = (255,0,0,200)
29+
}
30+
Ore
31+
{
32+
Resource = ResourceName=Ore,ScansatName=Ore
33+
LowColor = (0,0,0,0)
34+
HighColor = (0,255,0,200)
35+
}
36+
Water
37+
{
38+
Resource = ResourceName=Water,ScansatName=Aquifer
39+
LowColor = (0,0,0,0)
40+
HighColor = (0,0,255,200)
41+
}
42+
Minerals
43+
{
44+
Resource = ResourceName=Minerals,ScansatName=Minerals
45+
LowColor = (0,0,0,0)
46+
HighColor = (0,255,255,200)
47+
}
48+
Substrate
49+
{
50+
Resource = ResourceName=Substrate,ScansatName=Substrate
51+
LowColor = (0,0,0,0)
52+
HighColor = (255,0,255,200)
53+
}
54+
}
55+
}
56+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2014 Lukas Domagala
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
53 KB
Binary file not shown.

GameData/MapResourceOverlay/MapResourceOverlay.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"URL":"https://raw.githubusercontent.com/Cyrik/MapResourceOverlay/master/GameData/MapResourceOverlay/MapResourceOverlay.version",
44
"DOWNLOAD":"https://github.com/Cyrik/MapResourceOverlay/releases",
55
"CHANGE_LOG_URL":"",
6-
"VERSION":{"MAJOR":0,"MINOR":2,"PATCH":1,"BUILD":0},
6+
"VERSION":{"MAJOR":0,"MINOR":2,"PATCH":3,"BUILD":0},
77
"KSP_VERSION":{"MAJOR":0,"MINOR":24,"PATCH":2}
88
}
35.5 KB
Binary file not shown.
Lines changed: 48 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,56 @@
1-
globalSettings
1+
globalNode
22
{
3-
colorConfigs
3+
Heightmap
44
{
5-
Karbonite
6-
{
7-
Resource = ResourceName=Karbonite,ScansatName=Karbonite
8-
LowColor = (0,0,0,0)
9-
HighColor = (255,0,0,200)
10-
}
11-
Ore
12-
{
13-
Resource = ResourceName=Ore,ScansatName=Ore
14-
LowColor = (0,0,0,0)
15-
HighColor = (255,255,0,200)
16-
}
17-
Water
18-
{
19-
Resource = ResourceName=Water,ScansatName=Aquifer
20-
LowColor = (0,0,0,0)
21-
HighColor = (0,0,255,200)
22-
}
23-
Minerals
5+
Alpha = 100
6+
}
7+
Biomemap
8+
{
9+
Alpha = 100
10+
}
11+
ResourceOverlay
12+
{
13+
ActiveResource
2414
{
25-
Resource = ResourceName=Minerals,ScansatName=Minerals
26-
LowColor = (0,0,0,0)
27-
HighColor = (0,255,255,200)
15+
Karbonite
16+
{
17+
Resource = ResourceName=Karbonite,ScansatName=Karbonite
18+
LowColor = (0,0,0,0)
19+
HighColor = (255,0,0,200)
20+
}
2821
}
29-
Substrate
22+
colorConfigs
3023
{
31-
Resource = ResourceName=Substrate,ScansatName=Substrate
32-
LowColor = (0,0,0,0)
33-
HighColor = (255,0,255,200)
24+
Karbonite
25+
{
26+
Resource = ResourceName=Karbonite,ScansatName=Karbonite
27+
LowColor = (0,0,0,0)
28+
HighColor = (255,0,0,200)
29+
}
30+
Ore
31+
{
32+
Resource = ResourceName=Ore,ScansatName=Ore
33+
LowColor = (0,0,0,0)
34+
HighColor = (0,255,0,200)
35+
}
36+
Water
37+
{
38+
Resource = ResourceName=Water,ScansatName=Aquifer
39+
LowColor = (0,0,0,0)
40+
HighColor = (0,0,255,200)
41+
}
42+
Minerals
43+
{
44+
Resource = ResourceName=Minerals,ScansatName=Minerals
45+
LowColor = (0,0,0,0)
46+
HighColor = (0,255,255,200)
47+
}
48+
Substrate
49+
{
50+
Resource = ResourceName=Substrate,ScansatName=Substrate
51+
LowColor = (0,0,0,0)
52+
HighColor = (255,0,255,200)
53+
}
3454
}
3555
}
3656
}

Source/MapResourceOverlay/Extensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static class Extensions
1414
{
1515
public static void Log(this Object obj, string msg)
1616
{
17-
Debug.Log("[MRO][" + (new StackTrace()).GetFrame(1).GetMethod().Name + "] " + msg);
17+
Debug.Log("[MRO]["+obj.GetType()+"][" + (new StackTrace()).GetFrame(1).GetMethod().Name + "] " + msg);
1818
}
1919

2020
public static CelestialBody GetTargetBody(this MapObject target)
Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,78 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using UnityEngine;
1+
//using System;
2+
//using System.Collections.Generic;
3+
//using UnityEngine;
44

5-
namespace MapResourceOverlay
6-
{
7-
public class GlobalSettings : IConfigNode
8-
{
9-
public List<ResourceConfig> ColorConfigs { get; set; }
5+
//namespace MapResourceOverlay
6+
//{
7+
// public class GlobalSettings : IConfigNode
8+
// {
9+
// public List<ResourceConfig> ColorConfigs { get; set; }
1010

11-
public GlobalSettings()
12-
{
13-
var config = new ResourceConfig
14-
{
15-
Resource = new Resource("Karbonite"),
16-
LowColor = new Color32(0, 0, 0, 0),
17-
HighColor = new Color32(255, 0, 0, 200)
18-
};
19-
var config2 = new ResourceConfig
20-
{
21-
Resource = new Resource("Ore"),
22-
LowColor = new Color32(0, 0, 0, 0),
23-
HighColor = new Color32(0, 255, 0, 200)
24-
};
25-
var config3 = new ResourceConfig
26-
{
27-
Resource = new Resource("Water", "Aquifer"),
28-
LowColor = new Color32(0, 0, 0, 0),
29-
HighColor = new Color32(0, 0, 255, 200)
30-
};
31-
var config4 = new ResourceConfig
32-
{
33-
Resource = new Resource("Minerals"),
34-
LowColor = new Color32(0, 0, 0, 0),
35-
HighColor = new Color32(0, 255, 255, 200)
36-
};
37-
var config5 = new ResourceConfig
38-
{
39-
Resource = new Resource("Substrate"),
40-
LowColor = new Color32(0, 0, 0, 0),
41-
HighColor = new Color32(255, 0, 255, 200)
42-
};
43-
ColorConfigs = new List<ResourceConfig>{config, config2,config3,config4,config5};
44-
}
11+
// public GlobalSettings()
12+
// {
13+
// var config = new ResourceConfig
14+
// {
15+
// Resource = new Resource("Karbonite"),
16+
// LowColor = new Color32(0, 0, 0, 0),
17+
// HighColor = new Color32(255, 0, 0, 200)
18+
// };
19+
// var config2 = new ResourceConfig
20+
// {
21+
// Resource = new Resource("Ore"),
22+
// LowColor = new Color32(0, 0, 0, 0),
23+
// HighColor = new Color32(0, 255, 0, 200)
24+
// };
25+
// var config3 = new ResourceConfig
26+
// {
27+
// Resource = new Resource("Water", "Aquifer"),
28+
// LowColor = new Color32(0, 0, 0, 0),
29+
// HighColor = new Color32(0, 0, 255, 200)
30+
// };
31+
// var config4 = new ResourceConfig
32+
// {
33+
// Resource = new Resource("Minerals"),
34+
// LowColor = new Color32(0, 0, 0, 0),
35+
// HighColor = new Color32(0, 255, 255, 200)
36+
// };
37+
// var config5 = new ResourceConfig
38+
// {
39+
// Resource = new Resource("Substrate"),
40+
// LowColor = new Color32(0, 0, 0, 0),
41+
// HighColor = new Color32(255, 0, 255, 200)
42+
// };
43+
// ColorConfigs = new List<ResourceConfig>{config, config2,config3,config4,config5};
44+
// }
4545

46-
public void Load(ConfigNode node)
47-
{
46+
// public void Load(ConfigNode node)
47+
// {
4848

49-
try
50-
{
51-
var globalSettingsNode = node.GetNode("globalSettings");
52-
var colorConfigsNode = globalSettingsNode.GetNode("colorConfigs");
53-
ColorConfigs = new List<ResourceConfig>();
54-
foreach (ConfigNode value in colorConfigsNode.nodes)
55-
{
56-
ColorConfigs.Add(ResourceConfig.Load(value));
57-
}
58-
}
59-
catch (Exception e)
60-
{
61-
this.Log("Globalconfig broken"+e);
62-
}
63-
}
49+
// try
50+
// {
51+
// var globalSettingsNode = node.GetNode("globalSettings");
52+
// var colorConfigsNode = globalSettingsNode.GetNode("colorConfigs");
53+
// ColorConfigs = new List<ResourceConfig>();
54+
// foreach (ConfigNode value in colorConfigsNode.nodes)
55+
// {
56+
// ColorConfigs.Add(ResourceConfig.Load(value));
57+
// }
58+
// }
59+
// catch (Exception e)
60+
// {
61+
// this.Log("Globalconfig broken"+e);
62+
// }
63+
// }
6464

65-
public void Save(ConfigNode node)
66-
{
65+
// public void Save(ConfigNode node)
66+
// {
6767

68-
var globalSettingsNode = node.AddNode("globalSettings");
69-
var colorConfigsNode = globalSettingsNode.AddNode("colorConfigs");
70-
foreach (var colorConfig in ColorConfigs)
71-
{
72-
colorConfig.Save(colorConfigsNode);
73-
}
68+
// var globalSettingsNode = node.AddNode("globalSettings");
69+
// var colorConfigsNode = globalSettingsNode.AddNode("colorConfigs");
70+
// foreach (var colorConfig in ColorConfigs)
71+
// {
72+
// colorConfig.Save(colorConfigsNode);
73+
// }
7474

75-
}
75+
// }
7676

77-
}
78-
}
77+
// }
78+
//}

0 commit comments

Comments
 (0)