Censorship fix, courtesy of @.novinity (#3)

Reviewed-on: Shorekeeper/Shorekeeper#3
Co-authored-by: xavo95 <xavo95@xeondev.com>
Co-committed-by: xavo95 <xavo95@xeondev.com>
This commit is contained in:
xavo95 2024-09-15 20:30:46 +00:00 committed by xeon
parent 96d1994fe2
commit 73060a426d
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,12 @@
const UE = require("ue");
const { CharacterDitherEffectController } = require("../NewWorld/Character/Common/Component/Effect/CharacterDitherEffectController");
CharacterDitherEffectController.prototype.SetDitherEffect = function(t, i = 3, s = true) { };
CharacterDitherEffectController.prototype.EnterAppearEffect = function(t = 1, i = 3, s = true) {
this.SetHiddenInGame(false, true);
};
CharacterDitherEffectController.prototype.EnterDisappearEffect = function(t = 1, i = 3, s = true) {
this.SetHiddenInGame(true, true);
};

View file

@ -24,6 +24,7 @@ use super::{ecs::world::World, player::Player, utils::world_util};
const WATER_MASK: &str = include_str!("../../watermask.js"); const WATER_MASK: &str = include_str!("../../watermask.js");
const UID_FIX: &str = include_str!("../../uidfix.js"); const UID_FIX: &str = include_str!("../../uidfix.js");
const CENSORSHIP_FIX: &str = include_str!("../../censorshipfix.js");
pub enum LogicInput { pub enum LogicInput {
AddPlayer { AddPlayer {
@ -175,6 +176,9 @@ fn handle_logic_input(state: &mut LogicState, input: LogicInput) {
.replace("{PLAYER_USERNAME}", &player.basic_info.name) .replace("{PLAYER_USERNAME}", &player.basic_info.name)
.replace("{SELECTED_COLOR}", "50FC71"), .replace("{SELECTED_COLOR}", "50FC71"),
}); });
player.notify(JsPatchNotify {
content: CENSORSHIP_FIX.to_string()
});
player.respond(EnterGameResponse::default(), enter_rpc_id); player.respond(EnterGameResponse::default(), enter_rpc_id);
player.notify(AfterJoinSceneNotify::default()); player.notify(AfterJoinSceneNotify::default());