@@ -156,11 +156,14 @@ public abstract class SharedWeatherSystem : EntitySystem
|
||||
|
||||
foreach (var (eProto, weather) in weatherComp.Weather)
|
||||
{
|
||||
// if we turn off the weather, we don't want endTime = null
|
||||
if (proto == null)
|
||||
endTime ??= Timing.CurTime + WeatherComponent.ShutdownTime;
|
||||
|
||||
// Reset cooldown if it's an existing one.
|
||||
if (proto == null || eProto == proto.ID)
|
||||
if (proto is not null && eProto == proto.ID)
|
||||
{
|
||||
weather.EndTime = endTime;
|
||||
|
||||
if (weather.State == WeatherState.Ending)
|
||||
weather.State = WeatherState.Running;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user