From b8d037cb83f048e58b9fb6a1ea00b54c5a600b62 Mon Sep 17 00:00:00 2001 From: Kenneth VanderLinde Date: Wed, 19 Apr 2023 12:24:53 -0700 Subject: [PATCH] Add lighting style to the ZoneDTO --- src/main/java/net/rptools/maptool/model/Zone.java | 2 ++ src/main/proto/data_transfer_objects.proto | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/rptools/maptool/model/Zone.java b/src/main/java/net/rptools/maptool/model/Zone.java index 060d0f9e98..0332f33194 100644 --- a/src/main/java/net/rptools/maptool/model/Zone.java +++ b/src/main/java/net/rptools/maptool/model/Zone.java @@ -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(); @@ -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); diff --git a/src/main/proto/data_transfer_objects.proto b/src/main/proto/data_transfer_objects.proto index 6caefce8f4..10bc1d06ea 100644 --- a/src/main/proto/data_transfer_objects.proto +++ b/src/main/proto/data_transfer_objects.proto @@ -490,6 +490,10 @@ message ZoneDto { DAY = 1; NIGHT = 2; } + enum LightingStyleDto { + ENVIRONMENTAL = 0; + OVERTOP = 1; + } enum AStarRoundingOptionsDto { NONE = 0; CELL_UNIT = 1; @@ -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 {