Remove 700 usages of Component.Owner (#21100)

This commit is contained in:
DrSmugleaf
2023-10-19 12:34:31 -07:00
committed by GitHub
parent 5825ffb95c
commit f560f88eb5
261 changed files with 2291 additions and 2036 deletions

View File

@@ -15,31 +15,8 @@ namespace Content.Server.Shuttles.Components
/// <summary>
/// Whether the thruster has been force to be enabled / disabled (e.g. VV, interaction, etc.)
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public bool Enabled
{
get => _enabled;
[Obsolete("Use the system method")]
set
{
if (_enabled == value) return;
_enabled = value;
var system = EntitySystem.Get<ThrusterSystem>();
if (!_enabled)
{
system.DisableThruster(Owner, this);
}
else if (system.CanEnable(Owner, this))
{
system.EnableThruster(Owner, this);
}
}
}
[DataField("enabled")]
private bool _enabled = true;
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool Enabled { get; set; }
/// <summary>
/// This determines whether the thruster is actually enabled for the purposes of thrust