Skip to content

Commit

Permalink
More json fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dsrw committed Oct 10, 2023
1 parent b2650b1 commit b0cb947
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/models/serializers.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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}]"

Expand Down

0 comments on commit b0cb947

Please sign in to comment.