Remove some obsolete AppearanceComponent method usages (#13726)
This commit is contained in:
@@ -21,6 +21,7 @@ namespace Content.Server.Light.EntitySystems
|
||||
[Dependency] private readonly ClothingSystem _clothing = default!;
|
||||
[Dependency] private readonly TagSystem _tagSystem = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -107,20 +108,20 @@ namespace Content.Server.Light.EntitySystems
|
||||
{
|
||||
if (!Resolve(component.Owner, ref appearance, false)) return;
|
||||
|
||||
appearance.SetData(ExpendableLightVisuals.State, component.CurrentState);
|
||||
_appearance.SetData(appearance.Owner, ExpendableLightVisuals.State, component.CurrentState, appearance);
|
||||
|
||||
switch (component.CurrentState)
|
||||
{
|
||||
case ExpendableLightState.Lit:
|
||||
appearance.SetData(ExpendableLightVisuals.Behavior, component.TurnOnBehaviourID);
|
||||
_appearance.SetData(appearance.Owner, ExpendableLightVisuals.Behavior, component.TurnOnBehaviourID, appearance);
|
||||
break;
|
||||
|
||||
case ExpendableLightState.Fading:
|
||||
appearance.SetData(ExpendableLightVisuals.Behavior, component.FadeOutBehaviourID);
|
||||
_appearance.SetData(appearance.Owner, ExpendableLightVisuals.Behavior, component.FadeOutBehaviourID, appearance);
|
||||
break;
|
||||
|
||||
case ExpendableLightState.Dead:
|
||||
appearance.SetData(ExpendableLightVisuals.Behavior, string.Empty);
|
||||
_appearance.SetData(appearance.Owner, ExpendableLightVisuals.Behavior, string.Empty, appearance);
|
||||
var isHotEvent = new IsHotEvent() {IsHot = true};
|
||||
RaiseLocalEvent(component.Owner, isHotEvent);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user