Skip to content

Commit

Permalink
Merge branch 'release-1.13' into fix-4093
Browse files Browse the repository at this point in the history
  • Loading branch information
cwisniew authored May 31, 2023
2 parents 702bac0 + d1f0095 commit 79978e6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/main/java/net/rptools/maptool/model/Zone.java
Original file line number Diff line number Diff line change
Expand Up @@ -2347,6 +2347,10 @@ public static Zone fromDto(ZoneDto dto) {

public ZoneDto toDto() {
var dto = ZoneDto.newBuilder();
dto.setName(name);
if (playerAlias != null) {
dto.setPlayerAlias(StringValue.of(playerAlias));
}
dto.setCreationTime(creationTime);
dto.setId(id.toString());
dto.setGrid(grid.toDto());
Expand Down Expand Up @@ -2396,10 +2400,6 @@ public ZoneDto toDto() {
dto.setBoardPosition(Mapper.map(boardPosition));
dto.setDrawBoard(drawBoard);
dto.setBoardChanged(boardChanged);
dto.setName(name);
if (playerAlias != null) {
dto.setPlayerAlias(StringValue.of(playerAlias));
}
dto.setIsVisible(isVisible);
dto.setVisionType(ZoneDto.VisionTypeDto.valueOf(visionType.name()));
dto.setLightingStyle(ZoneDto.LightingStyleDto.valueOf(lightingStyle.name()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ static Drawable fromDto(DrawableDto drawableDto) {
drawable.setRadius(dto.getRadius());
var vertex = dto.getVertex();
drawable.setVertex(new ZonePoint(vertex.getX(), vertex.getY()));
drawable.setQuadrant(AbstractTemplate.Quadrant.valueOf(dto.getQuadrant()));
if (!dto.getQuadrant().isEmpty()) {
drawable.setQuadrant(AbstractTemplate.Quadrant.valueOf(dto.getQuadrant()));
}
drawable.setMouseSlopeGreater(dto.getMouseSlopeGreater());
var pathVertex = dto.getPathVertex();
drawable.setPathVertex(new ZonePoint(pathVertex.getX(), pathVertex.getY()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,14 @@ public DrawableDto toDto() {
.setZoneId(getZoneId().toString())
.setRadius(getRadius())
.setVertex(getVertex().toDto())
.setQuadrant(getQuadrant().name())
.setMouseSlopeGreater(isMouseSlopeGreater())
.setPathVertex(getPathVertex().toDto())
.setDoubleWide(isDoubleWide());
if (getPathVertex() != null) {
dto.setPathVertex(getPathVertex().toDto());
}
if (getQuadrant() != null) {
dto.setQuadrant(getQuadrant().name());
}

if (getName() != null) dto.setName(StringValue.of(getName()));

Expand Down

0 comments on commit 79978e6

Please sign in to comment.