This commit is contained in:
2026-09-10 15:19:22 +07:00
parent 90f36f1653
commit aea698bb6b
4 changed files with 16 additions and 2 deletions
+1
View File
@@ -1330,6 +1330,7 @@ message ScreenState {
string conclusion_video = 12; string conclusion_video = 12;
ScreenCommand command = 13; ScreenCommand command = 13;
int32 volume = 14; int32 volume = 14;
string background_image = 15;
} }
message CreateScreenSessionReq {} message CreateScreenSessionReq {}
@@ -3876,6 +3876,9 @@
"volume": { "volume": {
"type": "integer", "type": "integer",
"format": "int32" "format": "int32"
},
"backgroundImage": {
"type": "string"
} }
} }
}, },
+1
View File
@@ -316,6 +316,7 @@ func (s *server) enrichScreenState(ctx context.Context, session *screen_sessions
state.CoverImage = *game.Scenario.Image state.CoverImage = *game.Scenario.Image
} }
if game.Scenario != nil && game.Scenario.Story != nil { if game.Scenario != nil && game.Scenario.Story != nil {
state.BackgroundImage = game.Scenario.Story.Background
if game.Scenario.Story.Introduction != nil { if game.Scenario.Story.Introduction != nil {
state.IntroAudio = game.Scenario.Story.Introduction.Audio state.IntroAudio = game.Scenario.Story.Introduction.Audio
} }
+11 -2
View File
@@ -4713,6 +4713,7 @@ type ScreenState struct {
ConclusionVideo string `protobuf:"bytes,12,opt,name=conclusion_video,json=conclusionVideo,proto3" json:"conclusion_video,omitempty"` 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"` 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"` 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 unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
@@ -4845,6 +4846,13 @@ func (x *ScreenState) GetVolume() int32 {
return 0 return 0
} }
func (x *ScreenState) GetBackgroundImage() string {
if x != nil {
return x.BackgroundImage
}
return ""
}
type CreateScreenSessionReq struct { type CreateScreenSessionReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields 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" + "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" + "\bended_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampH\x01R\aendedAt\x88\x01\x01B\r\n" +
"\v_started_atB\v\n" + "\v_started_atB\v\n" +
"\t_ended_at\"\x8b\x04\n" + "\t_ended_at\"\xb6\x04\n" +
"\vScreenState\x12\x0e\n" + "\vScreenState\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" +
"\x06status\x18\x02 \x01(\tR\x06status\x12\x1c\n" + "\x06status\x18\x02 \x01(\tR\x06status\x12\x1c\n" +
@@ -8719,7 +8727,8 @@ const file_main_proto_rawDesc = "" +
"introAudio\x12)\n" + "introAudio\x12)\n" +
"\x10conclusion_video\x18\f \x01(\tR\x0fconclusionVideo\x12G\n" + "\x10conclusion_video\x18\f \x01(\tR\x0fconclusionVideo\x12G\n" +
"\acommand\x18\r \x01(\x0e2-.crabs.evening_detective_server.ScreenCommandR\acommand\x12\x16\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" + "\n" +
"\b_game_id\"\x18\n" + "\b_game_id\"\x18\n" +
"\x16CreateScreenSessionReq\"n\n" + "\x16CreateScreenSessionReq\"n\n" +