/// <summary> /// Create a copy of the <see cref="ZoneSystem.ZoneVegetation"/> /// </summary> /// <param name="zoneVegetation">ZoneVegetation to copy</param> public VegetationConfig(ZoneSystem.ZoneVegetation zoneVegetation) { Biome = zoneVegetation.m_biome; BiomeArea = zoneVegetation.m_biomeArea; Min = zoneVegetation.m_min; Max = zoneVegetation.m_max; BlockCheck = zoneVegetation.m_blockCheck; ForcePlacement = zoneVegetation.m_forcePlacement; MinAltitude = zoneVegetation.m_minAltitude; MaxAltitude = zoneVegetation.m_maxAltitude; MinOceanDepth = zoneVegetation.m_minOceanDepth; MaxOceanDepth = zoneVegetation.m_maxOceanDepth; MinTerrainDelta = zoneVegetation.m_minTerrainDelta; MaxTerrainDelta = zoneVegetation.m_maxTerrainDelta; TerrainDeltaRadius = zoneVegetation.m_terrainDeltaRadius; MinTilt = zoneVegetation.m_minTilt; MaxTilt = zoneVegetation.m_maxTilt; InForest = zoneVegetation.m_inForest; ForestThresholdMin = zoneVegetation.m_forestTresholdMin; ForestThresholdMax = zoneVegetation.m_forestTresholdMax; ScaleMin = zoneVegetation.m_scaleMin; ScaleMax = zoneVegetation.m_scaleMax; GroupSizeMin = zoneVegetation.m_groupSizeMin; GroupSizeMax = zoneVegetation.m_groupSizeMax; GroupRadius = zoneVegetation.m_groupRadius; GroundOffset = zoneVegetation.m_groundOffset; }
private string GetProperties(ZoneSystem.ZoneVegetation vegetation) { return($"<ul>" + $"{(vegetation.m_snapToWater ? "<li>Snap to water</li>" : "")}" + $"{(vegetation.m_scaleMax > vegetation.m_scaleMin ? $"<li>Random scale: {RangeString(vegetation.m_scaleMin, vegetation.m_scaleMax)}</li>" : "")}" + $"{(vegetation.m_groundOffset != 0 ? $"<li>Ground offset: {vegetation.m_groundOffset}" : "")}</li>" + $"</ul>"); }
private static string GetQuantity(ZoneSystem.ZoneVegetation vegetation) { if (vegetation.m_groupSizeMax > 1) { return($"<ul><li>{RangeString(vegetation.m_min, vegetation.m_max)} groups of {RangeString(vegetation.m_groupSizeMin, vegetation.m_groupSizeMax)}</li>{(vegetation.m_groupSizeMax > 1 ? $"<li>Group Radius: {vegetation.m_groupRadius}</li>": "")}</ul>"); } return($"{RangeString(vegetation.m_min, vegetation.m_max)}"); }
private static string GetNameBox(ZoneSystem.ZoneVegetation zoneVegetation, bool hasSprite) { StringBuilder sb = new StringBuilder(zoneVegetation.m_prefab.name); if (hasSprite) { sb.Append($"<br><img src=\"../../images/prefabs/{zoneVegetation.m_prefab.name}.png\">"); } return(sb.ToString()); }
private string GetFilters(ZoneSystem.ZoneVegetation vegetation) { var inForest = vegetation.m_inForest && (vegetation.m_forestTresholdMin > 0 || vegetation.m_forestTresholdMax < 1); return("<ul>" + $"<li>Altitude: {RangeString(vegetation.m_minAltitude, vegetation.m_maxAltitude)}</li>" + $"<li>Terrain Delta: {RangeString(vegetation.m_minTerrainDelta, vegetation.m_maxTerrainDelta)}</li>" + $"<li>Terrain Delta Radius: {vegetation.m_terrainDeltaRadius}</li>" + $"<li>Ocean Depth: {RangeString(vegetation.m_minOceanDepth, vegetation.m_maxOceanDepth)}</li>" + $"<li>Tilt: {RangeString(vegetation.m_minTilt, vegetation.m_maxTilt)}</li>" + $"{(inForest ? $"<li>Forest Threshold: {RangeString(vegetation.m_forestTresholdMin, vegetation.m_forestTresholdMax)}" : "")}</li>" + "</ul>"); }
internal void AddVegetation(ZoneSystem.ZoneVegetation veg) { Vegetation.Add(veg); }
public void RegisterVegetation(ZoneSystem.ZoneVegetation veg) { Vegetation.Add(veg); }