JSPatch Notify
This commit is contained in:
parent
7010df3376
commit
f5065fe4cf
2 changed files with 9 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
FROM alpine:3.20 as release
|
FROM alpine:3.20
|
||||||
ARG MICROSERVICE
|
ARG MICROSERVICE
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
|
@ -11,8 +11,9 @@ use std::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use common::time_util;
|
use common::time_util;
|
||||||
use shorekeeper_protocol::{message::Message, JoinSceneNotify, TransitionOptionPb};
|
use shorekeeper_protocol::{message::Message, JoinSceneNotify, TransitionOptionPb,
|
||||||
use shorekeeper_protocol::{AfterJoinSceneNotify, EnterGameResponse, PlayerSaveData};
|
AfterJoinSceneNotify, EnterGameResponse, JsPatchNotify};
|
||||||
|
use shorekeeper_protocol::{PlayerSaveData};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
player_save_task::{self, PlayerSaveReason},
|
player_save_task::{self, PlayerSaveReason},
|
||||||
|
@ -21,6 +22,8 @@ use crate::{
|
||||||
|
|
||||||
use super::{ecs::world::World, player::Player, utils::world_util};
|
use super::{ecs::world::World, player::Player, utils::world_util};
|
||||||
|
|
||||||
|
const WATER_MASK: &str = include_str!("../../watermask.js");
|
||||||
|
|
||||||
pub enum LogicInput {
|
pub enum LogicInput {
|
||||||
AddPlayer {
|
AddPlayer {
|
||||||
player_id: i32,
|
player_id: i32,
|
||||||
|
@ -164,6 +167,9 @@ fn handle_logic_input(state: &mut LogicState, input: LogicInput) {
|
||||||
scene_info: Some(scene_info),
|
scene_info: Some(scene_info),
|
||||||
transition_option: Some(TransitionOptionPb::default()),
|
transition_option: Some(TransitionOptionPb::default()),
|
||||||
});
|
});
|
||||||
|
player.notify(JsPatchNotify {
|
||||||
|
content: WATER_MASK.to_string(),
|
||||||
|
});
|
||||||
|
|
||||||
player.respond(EnterGameResponse::default(), enter_rpc_id);
|
player.respond(EnterGameResponse::default(), enter_rpc_id);
|
||||||
player.notify(AfterJoinSceneNotify::default());
|
player.notify(AfterJoinSceneNotify::default());
|
||||||
|
|
Loading…
Reference in a new issue