diff --git a/Content.Server/_CP14/Farming/CP14FarmingSystem.Resourse.cs b/Content.Server/_CP14/Farming/CP14FarmingSystem.Resourse.cs index c431f94d7f..97aba4d508 100644 --- a/Content.Server/_CP14/Farming/CP14FarmingSystem.Resourse.cs +++ b/Content.Server/_CP14/Farming/CP14FarmingSystem.Resourse.cs @@ -28,7 +28,7 @@ public sealed partial class CP14FarmingSystem private void OnTakeEnergyFromLight(Entity regeneration, ref CP14PlantUpdateEvent args) { var gainEnergy = false; - var daylight = _dayCycle.TryDaylightThere(regeneration, true); + var daylight = _dayCycle.UnderSunlight(regeneration); if (regeneration.Comp.Daytime && daylight) gainEnergy = true; diff --git a/Content.Server/_CP14/GameTicking/Rules/CP14VampireRuleSystem.cs b/Content.Server/_CP14/GameTicking/Rules/CP14VampireRuleSystem.cs index a723067ecd..f39cbda176 100644 --- a/Content.Server/_CP14/GameTicking/Rules/CP14VampireRuleSystem.cs +++ b/Content.Server/_CP14/GameTicking/Rules/CP14VampireRuleSystem.cs @@ -68,7 +68,7 @@ public sealed class CP14VampireRuleSystem : GameRuleSystem /// An entity being tested to see if it is in daylight /// Checks if the tile covers the weather (the only "roof" factor at the moment) - public bool TryDaylightThere(EntityUid target, bool checkRoof = true) + public bool UnderSunlight(EntityUid target) { + if (HasComp(target)) + return false; + var xform = Transform(target); if (!TryComp(xform.MapUid, out var dayCycle)) return false; var day = dayCycle.CurrentPeriod == DayPeriod; - if (!checkRoof || !TryComp(xform.GridUid, out var mapGrid)) + + if (!TryComp(xform.GridUid, out var mapGrid)) return day; var grid = xform.GridUid; diff --git a/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellCasterTeleport.cs b/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellCasterTeleport.cs index c3359f2784..e0b27cd4c3 100644 --- a/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellCasterTeleport.cs +++ b/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellCasterTeleport.cs @@ -1,7 +1,6 @@ using Content.Shared.Examine; using Content.Shared.Popups; using Robust.Shared.Map; -using Robust.Shared.Prototypes; namespace Content.Shared._CP14.MagicSpell.Spells;