From aea698bb6ba779cbc017dde357d7dc87c4a709fb Mon Sep 17 00:00:00 2001 From: Fedorov Vladimir Date: Thu, 10 Sep 2026 15:19:22 +0700 Subject: [PATCH] updates --- api/main.proto | 1 + cmd/evening_detective_server/main.swagger.json | 3 +++ internal/app/server.go | 1 + proto/main.pb.go | 13 +++++++++++-- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/api/main.proto b/api/main.proto index 6e0489c..8731564 100644 --- a/api/main.proto +++ b/api/main.proto @@ -1330,6 +1330,7 @@ message ScreenState { string conclusion_video = 12; ScreenCommand command = 13; int32 volume = 14; + string background_image = 15; } message CreateScreenSessionReq {} diff --git a/cmd/evening_detective_server/main.swagger.json b/cmd/evening_detective_server/main.swagger.json index 03a02eb..851f9c4 100644 --- a/cmd/evening_detective_server/main.swagger.json +++ b/cmd/evening_detective_server/main.swagger.json @@ -3876,6 +3876,9 @@ "volume": { "type": "integer", "format": "int32" + }, + "backgroundImage": { + "type": "string" } } }, diff --git a/internal/app/server.go b/internal/app/server.go index 7fc9514..86ec04c 100644 --- a/internal/app/server.go +++ b/internal/app/server.go @@ -316,6 +316,7 @@ func (s *server) enrichScreenState(ctx context.Context, session *screen_sessions state.CoverImage = *game.Scenario.Image } if game.Scenario != nil && game.Scenario.Story != nil { + state.BackgroundImage = game.Scenario.Story.Background if game.Scenario.Story.Introduction != nil { state.IntroAudio = game.Scenario.Story.Introduction.Audio } diff --git a/proto/main.pb.go b/proto/main.pb.go index 3a47ab2..9a39079 100644 --- a/proto/main.pb.go +++ b/proto/main.pb.go @@ -4713,6 +4713,7 @@ type ScreenState struct { ConclusionVideo string `protobuf:"bytes,12,opt,name=conclusion_video,json=conclusionVideo,proto3" json:"conclusion_video,omitempty"` Command ScreenCommand `protobuf:"varint,13,opt,name=command,proto3,enum=crabs.evening_detective_server.ScreenCommand" json:"command,omitempty"` Volume int32 `protobuf:"varint,14,opt,name=volume,proto3" json:"volume,omitempty"` + BackgroundImage string `protobuf:"bytes,15,opt,name=background_image,json=backgroundImage,proto3" json:"background_image,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -4845,6 +4846,13 @@ func (x *ScreenState) GetVolume() int32 { return 0 } +func (x *ScreenState) GetBackgroundImage() string { + if x != nil { + return x.BackgroundImage + } + return "" +} + type CreateScreenSessionReq struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields @@ -8700,7 +8708,7 @@ const file_main_proto_rawDesc = "" + "started_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampH\x00R\tstartedAt\x88\x01\x01\x12:\n" + "\bended_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampH\x01R\aendedAt\x88\x01\x01B\r\n" + "\v_started_atB\v\n" + - "\t_ended_at\"\x8b\x04\n" + + "\t_ended_at\"\xb6\x04\n" + "\vScreenState\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + "\x06status\x18\x02 \x01(\tR\x06status\x12\x1c\n" + @@ -8719,7 +8727,8 @@ const file_main_proto_rawDesc = "" + "introAudio\x12)\n" + "\x10conclusion_video\x18\f \x01(\tR\x0fconclusionVideo\x12G\n" + "\acommand\x18\r \x01(\x0e2-.crabs.evening_detective_server.ScreenCommandR\acommand\x12\x16\n" + - "\x06volume\x18\x0e \x01(\x05R\x06volumeB\n" + + "\x06volume\x18\x0e \x01(\x05R\x06volume\x12)\n" + + "\x10background_image\x18\x0f \x01(\tR\x0fbackgroundImageB\n" + "\n" + "\b_game_id\"\x18\n" + "\x16CreateScreenSessionReq\"n\n" +