2022-06-16 15:28:16 +10:00
|
|
|
using Content.Shared.Shuttles.Components;
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Shuttles.Systems;
|
|
|
|
|
|
|
|
|
|
public abstract class SharedRadarConsoleSystem : EntitySystem
|
|
|
|
|
{
|
2023-03-23 16:10:49 +11:00
|
|
|
public const float DefaultMinRange = 64f;
|
|
|
|
|
public const float DefaultMaxRange = 256f;
|
|
|
|
|
|
2023-07-08 09:02:17 -07:00
|
|
|
protected virtual void UpdateState(EntityUid uid, RadarConsoleComponent component)
|
|
|
|
|
{
|
|
|
|
|
}
|
2022-06-16 15:28:16 +10:00
|
|
|
|
2023-07-08 09:02:17 -07:00
|
|
|
public void SetRange(EntityUid uid, float value, RadarConsoleComponent component)
|
2022-06-16 15:28:16 +10:00
|
|
|
{
|
2023-07-08 09:02:17 -07:00
|
|
|
if (component.MaxRange.Equals(value))
|
|
|
|
|
return;
|
|
|
|
|
|
2022-06-16 15:28:16 +10:00
|
|
|
component.MaxRange = value;
|
2023-07-08 09:02:17 -07:00
|
|
|
Dirty(uid, component);
|
|
|
|
|
UpdateState(uid, component);
|
2022-06-16 15:28:16 +10:00
|
|
|
}
|
|
|
|
|
}
|