Fix rsi sprite access for verbs (#14284)

This commit is contained in:
metalgearsloth
2023-02-26 18:48:57 +11:00
committed by GitHub
parent a6d0c9b129
commit 44fb8a9e2d
53 changed files with 313 additions and 271 deletions

View File

@@ -32,24 +32,25 @@ public abstract class SharedFoldableSystem : EntitySystem
return;
if (state.IsFolded != component.IsFolded)
SetFolded(component, state.IsFolded);
SetFolded(uid, component, state.IsFolded);
}
private void OnFoldableInit(EntityUid uid, FoldableComponent component, ComponentInit args)
{
SetFolded(component, component.IsFolded);
SetFolded(uid, component, component.IsFolded);
}
/// <summary>
/// Set the folded state of the given <see cref="FoldableComponent"/>
/// </summary>
/// <param name="component"></param>
/// <param name="folded">If true, the component will become folded, else unfolded</param>
public virtual void SetFolded(FoldableComponent component, bool folded)
public virtual void SetFolded(EntityUid uid, FoldableComponent component, bool folded)
{
if (component.IsFolded == folded)
return;
component.IsFolded = folded;
Dirty(component);
Appearance.SetData(component.Owner, FoldedVisuals.State, folded);
Appearance.SetData(uid, FoldedVisuals.State, folded);
}
private void OnInsertEvent(EntityUid uid, FoldableComponent component, ContainerGettingInsertedAttemptEvent args)