JSPatch Notify

This commit is contained in:
xavo95 2024-09-13 11:33:31 +02:00
parent 7010df3376
commit f5065fe4cf
Signed by: xavo95
GPG key ID: CBF8ADED6DEBB783
2 changed files with 9 additions and 3 deletions

View file

@ -1,4 +1,4 @@
FROM alpine:3.20 as release
FROM alpine:3.20
ARG MICROSERVICE
WORKDIR /app

View file

@ -11,8 +11,9 @@ use std::{
};
use common::time_util;
use shorekeeper_protocol::{message::Message, JoinSceneNotify, TransitionOptionPb};
use shorekeeper_protocol::{AfterJoinSceneNotify, EnterGameResponse, PlayerSaveData};
use shorekeeper_protocol::{message::Message, JoinSceneNotify, TransitionOptionPb,
AfterJoinSceneNotify, EnterGameResponse, JsPatchNotify};
use shorekeeper_protocol::{PlayerSaveData};
use crate::{
player_save_task::{self, PlayerSaveReason},
@ -21,6 +22,8 @@ use crate::{
use super::{ecs::world::World, player::Player, utils::world_util};
const WATER_MASK: &str = include_str!("../../watermask.js");
pub enum LogicInput {
AddPlayer {
player_id: i32,
@ -164,6 +167,9 @@ fn handle_logic_input(state: &mut LogicState, input: LogicInput) {
scene_info: Some(scene_info),
transition_option: Some(TransitionOptionPb::default()),
});
player.notify(JsPatchNotify {
content: WATER_MASK.to_string(),
});
player.respond(EnterGameResponse::default(), enter_rpc_id);
player.notify(AfterJoinSceneNotify::default());