]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Night on Europa (#27731)
authorEd <96445749+TheShuEd@users.noreply.github.com>
Tue, 7 May 2024 03:02:22 +0000 (06:02 +0300)
committerGitHub <noreply@github.com>
Tue, 7 May 2024 03:02:22 +0000 (20:02 -0700)
night

Content.Server/Parallax/BiomeSystem.cs
Content.Server/Station/Components/StationBiomeComponent.cs
Content.Server/Station/Systems/StationBiomeSystem.cs

index 83cf9b9cb2d8c8b9f5040b74d9c3806f22719575..0543518dcc9a3ed426101986ec4b0187018167bc 100644 (file)
@@ -973,7 +973,7 @@ public sealed partial class BiomeSystem : SharedBiomeSystem
     /// <summary>
     /// Creates a simple planet setup for a map.
     /// </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))
             return;
@@ -998,7 +998,7 @@ public sealed partial class BiomeSystem : SharedBiomeSystem
         // Lava: #A34931
 
         var light = EnsureComp<MapLightComponent>(mapUid);
-        light.AmbientLightColor = Color.FromHex("#D8B059");
+        light.AmbientLightColor = mapLight ?? Color.FromHex("#D8B059");
         Dirty(mapUid, light, metadata);
 
         var moles = new float[Atmospherics.AdjustedNumberOfGases];
index 38800579a9320c30ca0c4a0604346a13525ccabf..0eb64aaff8092a3d13336d063d62771617dd9eec 100644 (file)
@@ -16,4 +16,7 @@ public sealed partial class StationBiomeComponent : Component
     // If null, its random
     [DataField]
     public int? Seed = null;
+
+    [DataField]
+    public Color MapLightColor = Color.Black;
 }
index 821745fc4d73e2191fe5ec87c3048d1ec21b1998..8c80806ccf5ad585c974d81904f013381591845f 100644 (file)
@@ -30,6 +30,6 @@ public sealed partial class StationBiomeSystem : EntitySystem
         var mapId = Transform(station.Value).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);
     }
 }