internal static void ParseModelConfig(StaticModel target, ConfigNode cfgNode) { if (!ConfigUtil.initialized) { ConfigUtil.InitTypes(); } foreach (var field in ConfigUtil.modelFields.Values) { ConfigUtil.ReadCFGNode(target, field, cfgNode); } foreach (ConfigNode variNode in cfgNode.GetNodes("VARIANT")) { Log.Normal("found variant: " + variNode.GetValue("name")); ModelVariant variant = new ModelVariant(target, variNode); if (string.IsNullOrEmpty(variant.name)) { Log.UserError("model " + target.name + " has a variant without a name"); continue; } if (!target.variants.ContainsKey(variant.name)) { Log.Normal("added variant: " + variant.name); target.variants.Add(variant.name, variant); } else { Log.UserError("model " + target.name + " already has a vaiant with name: " + variant.name); } } }
/// <summary> /// Parser for MapDecalInstance Objects /// </summary> /// <param name="target"></param> /// <param name="cfgNode"></param> internal static void ParseDecalsMapConfig(MapDecalsMap target, ConfigNode cfgNode) { if (!ConfigUtil.initialized) { ConfigUtil.InitTypes(); } foreach (var field in ConfigUtil.mapDecalsMapFields.Values) { ConfigUtil.ReadCFGNode(target, field, cfgNode); } }
internal static void ParseModelConfig(StaticModel target, ConfigNode cfgNode) { if (!ConfigUtil.initialized) { ConfigUtil.InitTypes(); } foreach (var field in ConfigUtil.modelFields.Values) { ConfigUtil.ReadCFGNode(target, field, cfgNode); } }
/// <summary> /// Parser for MapDecalInstance Objects /// </summary> /// <param name="cfgNode"></param> internal void ParseCFGNode(ConfigNode cfgNode) { if (!ConfigUtil.initialized) { ConfigUtil.InitTypes(); } foreach (var field in ConfigUtil.groupCenterFields.Values) { ConfigUtil.ReadCFGNode(this, field, cfgNode); } }