@@ -973,7 +973,7 @@ public sealed partial class BiomeSystem : SharedBiomeSystem
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a simple planet setup for a map.
|
/// Creates a simple planet setup for a map.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void EnsurePlanet(EntityUid mapUid, BiomeTemplatePrototype biomeTemplate, int? seed = null, MetaDataComponent? metadata = null)
|
public void EnsurePlanet(EntityUid mapUid, BiomeTemplatePrototype biomeTemplate, int? seed = null, MetaDataComponent? metadata = null, Color? mapLight = null)
|
||||||
{
|
{
|
||||||
if (!Resolve(mapUid, ref metadata))
|
if (!Resolve(mapUid, ref metadata))
|
||||||
return;
|
return;
|
||||||
@@ -998,7 +998,7 @@ public sealed partial class BiomeSystem : SharedBiomeSystem
|
|||||||
// Lava: #A34931
|
// Lava: #A34931
|
||||||
|
|
||||||
var light = EnsureComp<MapLightComponent>(mapUid);
|
var light = EnsureComp<MapLightComponent>(mapUid);
|
||||||
light.AmbientLightColor = Color.FromHex("#D8B059");
|
light.AmbientLightColor = mapLight ?? Color.FromHex("#D8B059");
|
||||||
Dirty(mapUid, light, metadata);
|
Dirty(mapUid, light, metadata);
|
||||||
|
|
||||||
var moles = new float[Atmospherics.AdjustedNumberOfGases];
|
var moles = new float[Atmospherics.AdjustedNumberOfGases];
|
||||||
|
|||||||
@@ -16,4 +16,7 @@ public sealed partial class StationBiomeComponent : Component
|
|||||||
// If null, its random
|
// If null, its random
|
||||||
[DataField]
|
[DataField]
|
||||||
public int? Seed = null;
|
public int? Seed = null;
|
||||||
|
|
||||||
|
[DataField]
|
||||||
|
public Color MapLightColor = Color.Black;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,6 @@ public sealed partial class StationBiomeSystem : EntitySystem
|
|||||||
var mapId = Transform(station.Value).MapID;
|
var mapId = Transform(station.Value).MapID;
|
||||||
var mapUid = _mapManager.GetMapEntityId(mapId);
|
var mapUid = _mapManager.GetMapEntityId(mapId);
|
||||||
|
|
||||||
_biome.EnsurePlanet(mapUid, _proto.Index(map.Comp.Biome), map.Comp.Seed);
|
_biome.EnsurePlanet(mapUid, _proto.Index(map.Comp.Biome), map.Comp.Seed, mapLight: map.Comp.MapLightColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user