diff --git a/src/models/serializers.nim b/src/models/serializers.nim index 04c72d09..bbbe5272 100644 --- a/src/models/serializers.nim +++ b/src/models/serializers.nim @@ -83,18 +83,11 @@ proc from_json_hook(self: var Bot, json: JsonNode) = self.shared.edits.from_json(json["edits"]) proc `$`(self: Color): string = - result = if self == action_colors[eraser]: - "\"\"" - else: - for i, color in Colors.enum_fields: - if self == action_colors[Colors(i)]: - return \"\"{color}\"" - \"\"{self.to_html_hex}\"" + $json_utils.to_json(self) proc `$`(self: VoxelInfo): string = \"[{self.kind.ord}, \"{self.color}\"]" - proc `$`(self: Vector3): string = \"[{self.x}, {self.y}, {self.z}]"