Skip to content

Commit

Permalink
Fix initial maptext vars (#2181)
Browse files Browse the repository at this point in the history
  • Loading branch information
wixoaGit authored Jan 24, 2025
1 parent b8e919d commit b90c210
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions OpenDreamRuntime/AtomManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,11 @@ public MutableAppearance GetAppearanceFromDefinition(DreamObjectDefinition def)
def.TryGetVariable("render_target", out var renderTargetVar);
def.TryGetVariable("blend_mode", out var blendModeVar);
def.TryGetVariable("appearance_flags", out var appearanceFlagsVar);
def.TryGetVariable("maptext", out var maptextVar);
def.TryGetVariable("maptext_width", out var maptextWidthVar);
def.TryGetVariable("maptext_height", out var maptextHeightVar);
def.TryGetVariable("maptext_x", out var maptextXVar);
def.TryGetVariable("maptext_y", out var maptextYVar);

appearance = MutableAppearance.Get();
SetAppearanceVar(appearance, "name", nameVar);
Expand All @@ -739,6 +744,11 @@ public MutableAppearance GetAppearanceFromDefinition(DreamObjectDefinition def)
SetAppearanceVar(appearance, "render_target", renderTargetVar);
SetAppearanceVar(appearance, "blend_mode", blendModeVar);
SetAppearanceVar(appearance, "appearance_flags", appearanceFlagsVar);
SetAppearanceVar(appearance, "maptext", maptextVar);
SetAppearanceVar(appearance, "maptext_width", maptextWidthVar);
SetAppearanceVar(appearance, "maptext_height", maptextHeightVar);
SetAppearanceVar(appearance, "maptext_x", maptextXVar);
SetAppearanceVar(appearance, "maptext_y", maptextYVar);

if (def.TryGetVariable("transform", out var transformVar) && transformVar.TryGetValueAsDreamObject<DreamObjectMatrix>(out var transformMatrix)) {
appearance.Transform = DreamObjectMatrix.MatrixToTransformFloatArray(transformMatrix);
Expand Down

0 comments on commit b90c210

Please sign in to comment.