Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lighting style to the ZoneDto #3983

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/main/java/net/rptools/maptool/model/Zone.java
Original file line number Diff line number Diff line change
Expand Up @@ -2300,6 +2300,7 @@ public static Zone fromDto(ZoneDto dto) {
zone.playerAlias = dto.hasPlayerAlias() ? dto.getPlayerAlias().getValue() : null;
zone.isVisible = dto.getIsVisible();
zone.visionType = VisionType.valueOf(dto.getVisionType().name());
zone.lightingStyle = LightingStyle.valueOf(dto.getLightingStyle().name());
zone.tokenSelection = TokenSelection.valueOf(dto.getTokenSelection().name());
zone.height = dto.getHeight();
zone.width = dto.getWidth();
Expand Down Expand Up @@ -2369,6 +2370,7 @@ public ZoneDto toDto() {
}
dto.setIsVisible(isVisible);
dto.setVisionType(ZoneDto.VisionTypeDto.valueOf(visionType.name()));
dto.setLightingStyle(ZoneDto.LightingStyleDto.valueOf(lightingStyle.name()));
dto.setTokenSelection(ZoneDto.TokenSelectionDto.valueOf(tokenSelection.name()));
dto.setHeight(height);
dto.setWidth(width);
Expand Down
11 changes: 8 additions & 3 deletions src/main/proto/data_transfer_objects.proto
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,10 @@ message ZoneDto {
DAY = 1;
NIGHT = 2;
}
enum LightingStyleDto {
ENVIRONMENTAL = 0;
OVERTOP = 1;
}
enum AStarRoundingOptionsDto {
NONE = 0;
CELL_UNIT = 1;
Expand Down Expand Up @@ -529,9 +533,10 @@ message ZoneDto {
google.protobuf.StringValue player_alias = 32;
bool is_visible = 33;
VisionTypeDto vision_type = 34;
TokenSelectionDto token_selection = 35;
int32 height = 36;
int32 width = 37;
LightingStyleDto lighting_style = 35;
TokenSelectionDto token_selection = 36;
int32 height = 37;
int32 width = 38;
}

message InitiativeListDto {
Expand Down