From cc9e40820fa48a7378c6b96371ef819010e7c085 Mon Sep 17 00:00:00 2001
From: Ed <96445749+TheShuEd@users.noreply.github.com>
Date: Tue, 7 May 2024 06:02:22 +0300
Subject: [PATCH] Night on Europa (#27731)
night
---
Content.Server/Parallax/BiomeSystem.cs | 4 ++--
Content.Server/Station/Components/StationBiomeComponent.cs | 3 +++
Content.Server/Station/Systems/StationBiomeSystem.cs | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Content.Server/Parallax/BiomeSystem.cs b/Content.Server/Parallax/BiomeSystem.cs
index 83cf9b9cb2..0543518dcc 100644
--- a/Content.Server/Parallax/BiomeSystem.cs
+++ b/Content.Server/Parallax/BiomeSystem.cs
@@ -973,7 +973,7 @@ public sealed partial class BiomeSystem : SharedBiomeSystem
///
/// Creates a simple planet setup for a map.
///
- 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(mapUid);
- light.AmbientLightColor = Color.FromHex("#D8B059");
+ light.AmbientLightColor = mapLight ?? Color.FromHex("#D8B059");
Dirty(mapUid, light, metadata);
var moles = new float[Atmospherics.AdjustedNumberOfGases];
diff --git a/Content.Server/Station/Components/StationBiomeComponent.cs b/Content.Server/Station/Components/StationBiomeComponent.cs
index 38800579a9..0eb64aaff8 100644
--- a/Content.Server/Station/Components/StationBiomeComponent.cs
+++ b/Content.Server/Station/Components/StationBiomeComponent.cs
@@ -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;
}
diff --git a/Content.Server/Station/Systems/StationBiomeSystem.cs b/Content.Server/Station/Systems/StationBiomeSystem.cs
index 821745fc4d..8c80806ccf 100644
--- a/Content.Server/Station/Systems/StationBiomeSystem.cs
+++ b/Content.Server/Station/Systems/StationBiomeSystem.cs
@@ -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);
}
}
--
2.52.0