Silva Photosynthes returns + Carcat guidebook page (#1269)

* f

* restore silva feature

* carcat guidebook

* day cycle
This commit is contained in:
Ed
2025-05-15 00:37:42 +03:00
committed by GitHub
parent e361125549
commit 26e4088cdd
11 changed files with 192 additions and 17 deletions

View File

@@ -1,15 +1,16 @@
using Content.Server._CP14.MagicEnergy.Components;
using Content.Shared._CP14.DayCycle;
using Content.Shared._CP14.MagicEnergy.Components;
using Content.Shared.Damage;
using Content.Shared.Mobs.Components;
using Content.Shared.Mobs.Systems;
using Robust.Shared.Map.Components;
namespace Content.Server._CP14.MagicEnergy;
public partial class CP14MagicEnergySystem
{
[Dependency] private readonly MobStateSystem _mobState = default!;
[Dependency] private readonly CP14DayCycleSystem _dayCycle = default!;
private void InitializeDraw()
{
@@ -75,16 +76,7 @@ public partial class CP14MagicEnergySystem
draw.NextUpdateTime = _gameTiming.CurTime + TimeSpan.FromSeconds(draw.Delay);
var daylight = false;
//if (TryComp<MapLightComponent>(Transform(uid).MapUid, out var mapLight))
//{
// var color = mapLight.AmbientLightColor;
// var medium = (color.R + color.G + color.B) / 3f;
//
// if (medium > draw.LightThreshold)
// daylight = true;
//}
var daylight = _dayCycle.UnderSunlight(uid);
ChangeEnergy((uid, magicContainer), daylight ? draw.DaylightEnergy : draw.DarknessEnergy, out _, out _, true);
}