Support for Nested combat messages and JSPatch Notify from files #2
2 changed files with 15 additions and 0 deletions
|
@ -23,6 +23,7 @@ use crate::{
|
|||
use super::{ecs::world::World, player::Player, utils::world_util};
|
||||
|
||||
const WATER_MASK: &str = include_str!("../../watermask.js");
|
||||
const UID_FIX: &str = include_str!("../../uidfix.js");
|
||||
|
||||
pub enum LogicInput {
|
||||
AddPlayer {
|
||||
|
@ -170,6 +171,11 @@ fn handle_logic_input(state: &mut LogicState, input: LogicInput) {
|
|||
player.notify(JsPatchNotify {
|
||||
content: WATER_MASK.to_string(),
|
||||
});
|
||||
player.notify(JsPatchNotify {
|
||||
content: UID_FIX
|
||||
.replace("{PLAYER_USERNAME}", &player.basic_info.name)
|
||||
.replace("{SELECTED_COLOR}", "50FC71"),
|
||||
});
|
||||
|
||||
player.respond(EnterGameResponse::default(), enter_rpc_id);
|
||||
player.notify(AfterJoinSceneNotify::default());
|
||||
|
|
9
game-server/uidfix.js
Normal file
9
game-server/uidfix.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
setTimeout(() => {
|
||||
const UiManager_1 = require("../Ui/UiManager");
|
||||
const UE = require("ue");
|
||||
const ControllerManagerBase_1 = require("../../Core/Framework/ControllerManagerBase");
|
||||
|
||||
const UiText = UiManager_1.UiManager.GetViewByName("UidView").GetText(0);
|
||||
UiText.SetText("{PLAYER_USERNAME} - Reversed Rooms");
|
||||
UiText.SetColor(UE. Color.FromHex("{SELECTED_COLOR}"));
|
||||
}, 10000);
|
Loading…
Reference in a new issue