From f5065fe4cfddc58e8db91e062aa92d83000f9bf2 Mon Sep 17 00:00:00 2001 From: xavo95 Date: Fri, 13 Sep 2024 11:33:31 +0200 Subject: [PATCH] JSPatch Notify --- Dockerfile-service | 2 +- game-server/src/logic/thread_mgr.rs | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Dockerfile-service b/Dockerfile-service index 9234785..3cbc311 100644 --- a/Dockerfile-service +++ b/Dockerfile-service @@ -1,4 +1,4 @@ -FROM alpine:3.20 as release +FROM alpine:3.20 ARG MICROSERVICE WORKDIR /app diff --git a/game-server/src/logic/thread_mgr.rs b/game-server/src/logic/thread_mgr.rs index 8ebd476..5b1ca87 100644 --- a/game-server/src/logic/thread_mgr.rs +++ b/game-server/src/logic/thread_mgr.rs @@ -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());