Skip to content

Commit

Permalink
oh wait I can just update the appearance
Browse files Browse the repository at this point in the history
  • Loading branch information
amylizzle committed Dec 24, 2023
1 parent 9bad414 commit e179978
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions OpenDreamRuntime/Objects/Types/DreamObjectImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ protected override void SetVar(string varName, DreamValue value) {
newAppearance.Direction = Appearance!.Direction;

Appearance = newAppearance;
if(_entity != EntityUid.Invalid) {
DMISpriteComponent sprite = EntityManager.GetComponent<DMISpriteComponent>(_entity);
sprite.SetAppearance(Appearance!);
}
break;
case "loc":
value.TryGetValueAsDreamObject(out _loc);
Expand Down Expand Up @@ -182,6 +186,10 @@ protected override void SetVar(string varName, DreamValue value) {
default:
if (AtomManager.IsValidAppearanceVar(varName)) {
AtomManager.SetAppearanceVar(Appearance!, varName, value);
if(_entity != EntityUid.Invalid) {
DMISpriteComponent sprite = EntityManager.GetComponent<DMISpriteComponent>(_entity);
sprite.SetAppearance(Appearance!);
}
break;
}

Expand Down

0 comments on commit e179978

Please sign in to comment.