mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
Run config parsing after MM is done running
MM is now a hard dependency
This commit is contained in:
parent
4566a3439a
commit
5268435693
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:134bc69201f8ed0b03f147552f6b8cd080a9e9e715a0355209f27afdfae16432
|
||||
size 28160
|
||||
oid sha256:b382a49057472d4ba44cb722cd3a1e6956800b06e085e967e17708721dd11be2
|
||||
size 28672
|
||||
|
|
|
@ -2,8 +2,7 @@ using System.Collections.Generic;
|
|||
using UnityEngine;
|
||||
|
||||
namespace ConformalDecals {
|
||||
[KSPAddon(KSPAddon.Startup.Instantly, true)]
|
||||
public class ConformalDecalConfig : MonoBehaviour {
|
||||
public static class ConformalDecalConfig {
|
||||
private static List<string> _shaderBlacklist;
|
||||
|
||||
public static bool IsBlacklisted(Shader shader) {
|
||||
|
@ -14,7 +13,7 @@ namespace ConformalDecals {
|
|||
return _shaderBlacklist.Contains(shaderName);
|
||||
}
|
||||
|
||||
private void ParseConfig(ConfigNode node) {
|
||||
private static void ParseConfig(ConfigNode node) {
|
||||
foreach (var blacklist in node.GetNodes("SHADERBLACKLIST")) {
|
||||
foreach (var shaderName in blacklist.GetValuesList("shader")) {
|
||||
_shaderBlacklist.Add(shaderName);
|
||||
|
@ -22,13 +21,13 @@ namespace ConformalDecals {
|
|||
}
|
||||
}
|
||||
|
||||
private void Start() {
|
||||
public static void ModuleManagerPostLoad() {
|
||||
_shaderBlacklist = new List<string>();
|
||||
|
||||
var configs = GameDatabase.Instance.GetConfigs("CONFORMALDECALS");
|
||||
|
||||
if (configs.Length > 0) {
|
||||
Debug.Log("DecalConfig loading config");
|
||||
Debug.Log("ConformalDecals: loading config");
|
||||
foreach (var config in configs) {
|
||||
ParseConfig(config.config);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user