Fix rsi sprite access for verbs (#14284)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user