Skip to content

Commit

Permalink
and AddOption
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaPiggy committed Sep 14, 2024
1 parent 1ca59ad commit 2f3633a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Winch/Util/DialogueUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ internal static string InstructionsToText(this Yarn.Node node, SerializedDiction
var operands = string.Join(" ", instruction.Operands.Select(operand => OperandToText(operand)));
var labels = node.Labels.Where(label => label.Value == i).Select(label => label.Key);
var stringifiedLabels = labels.Count() > 0 ? $" [{string.Join(", ", labels)}]" : string.Empty;
var metadata = instruction.Opcode == Instruction.Types.OpCode.RunLine ? (" (" + lineMetadata.GetValueOrDefault(instruction.Operands.FirstOrDefault().StringValue) + ")") : string.Empty;
var metadata = (instruction.Opcode == Instruction.Types.OpCode.RunLine || instruction.Opcode == Instruction.Types.OpCode.AddOption) ? (" (" + lineMetadata.GetValueOrDefault(instruction.Operands.FirstOrDefault().StringValue) + ")") : string.Empty;
return $" {i} {instruction.Opcode} {operands}{stringifiedLabels}{metadata}";
}));
}
Expand Down

0 comments on commit 2f3633a

Please sign in to comment.