Skip to content

Notifications#4

Merged
astra1dev merged 12 commits into
astra1dev:reloadedfrom
fiszfasznasz:astralum
Feb 12, 2026
Merged

Notifications#4
astra1dev merged 12 commits into
astra1dev:reloadedfrom
fiszfasznasz:astralum

Conversation

@fiszfasznasz
Copy link
Copy Markdown

No description provided.

@dimonn1221
Copy link
Copy Markdown

how to fix russian letters not typing? sometimes they work with capslock???

@Limehcik
Copy link
Copy Markdown

как исправить непечатаемые русские буквы? иногда они работают с Caps Lock???

Ошибка в коде, там чуть чуть с юникодом проблема, а русские символы далековато в нем, в малум меню мультилингуал есть исправление:

    [HarmonyPatch(typeof(TextBoxTMP), nameof(TextBoxTMP.IsCharAllowed))]
    public static class TextBoxTMP_IsCharAllowed
    {
        public static bool Prefix(TextBoxTMP __instance, char i, ref bool __result)
        {
            if (CheatToggles.chatJailbreak)
            {
                // Block only *actual* control characters and obvious UI-breakers
                HashSet<char> blockedSymbols = new() { '\b', '\r' /* no < or > */ };

                if (blockedSymbols.Contains(i))
                {
                    Debug.Log($"[MalumMenu] Blocked control character: {i} (Unicode: {(int)i:X4})");
                    __result = false;
                    return false;
                }

                __result = true;
                return false; // Allow all others, including layout-wonky characters
            }

            return true;
        }
    }

@unksidebl-lgtm
Copy link
Copy Markdown

@Limehcik а у тебя нет случаем готовой длл с фиксом?
либо нет сайта на котором подробно прописано как скомпелировать длл?

@Limehcik
Copy link
Copy Markdown

Limehcik commented Oct 1, 2025

@Limehcik а у тебя нет случаем готовой длл с фиксом? либо нет сайта на котором подробно прописано как скомпелировать длл?

Я делал полный переврд сикоменю поэтому разбираюсь, я могу собрать фикс ошибки и выложить, в течении недели сделаю(изза проблем с интернетом я могу пользоваться только 2g(Ешка))

@unksidebl-lgtm
Copy link
Copy Markdown

@Limehcik а у тебя нет случаем готовой длл с фиксом? либо нет сайта на котором подробно прописано как скомпелировать длл?

Я делал полный переврд сикоменю поэтому разбираюсь, я могу собрать фикс ошибки и выложить, в течении недели сделаю(изза проблем с интернетом я могу пользоваться только 2g(Ешка))

Буду ждать)

@unksidebl-lgtm
Copy link
Copy Markdown

@Limehcik Ну что там с фиксом?

@Limehcik
Copy link
Copy Markdown

Limehcik commented Oct 4, 2025

@LimehcikНу что там с фиксом?

Я седня зашел и кароч, все сделал но собрать не могу, зависимости для него не качаются без впн, впн есть рабочий только для браузера, я их скачал, но прога не в какую их не принимает и пытается скачать, я бился несколько часов, может еще буду искать решение, но врятли

@Limehcik

This comment has been minimized.

@unksidebl-lgtm
Copy link
Copy Markdown

@LimehcikНу что там с фиксом?

Я седня зашел и кароч, все сделал но собрать не могу, зависимости для него не качаются без впн, впн есть рабочий только для браузера, я их скачал, но прога не в какую их не принимает и пытается скачать, я бился несколько часов, может еще буду искать решение, но врятли

@Limehcik попробуй Vpnly, на германии всё работает и впн бесплатный, правда регион выбрать нельзя там на удачу включать и выключать надо

@getfked42012-web

This comment has been minimized.

@astra1dev
Copy link
Copy Markdown
Owner

@fiszfasznasz if you are still interested in having this merged, I would like to request some changes:

  • Remove unnecessary changes like whitespace removals
  • Fix conflicts
  • Use the existing ConsoleUI instead of creating a Notifications UI

@Revonced

This comment was marked as spam.

@szpont1312

This comment was marked as spam.

@ReactorCoreDev

This comment was marked as spam.

@astra1dev
Copy link
Copy Markdown
Owner

lets see what copilot thinks just for fun

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@catfueledmayhem

This comment was marked as off-topic.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 14 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Cheats/NotificationHandler.cs Outdated
if (!CheatToggles.notifyOnDeath || killer == null || target == null) return;

var (realKillerName, displayKillerName, isDisguised) = GetPlayerIdentity(killer);
string targetName = $"<color=#{ColorUtility.ToHtmlStringRGB(target.Data.Color)}>{target.CurrentOutfit.PlayerName}</color>";
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential NullReferenceException on line 80. Similar to line 58, after checking if target is null on line 77, the code accesses target.Data.Color and target.CurrentOutfit.PlayerName without verifying that target.Data and target.CurrentOutfit are not null. These should be checked before access to prevent potential exceptions.

Copilot uses AI. Check for mistakes.
Comment thread src/Utilities/Utils.cs Outdated
Comment on lines +106 to +117
// ==================================================================
// [FIX 2] Replaced the body of murderPlayer.
// This now uses the game's standard method, which will be intercepted
// by your PlayerControl_CmdCheckMurder patch. This is the correct and
// more stable way to implement host-powered kills.
public static void murderPlayer(PlayerControl target, MurderResultFlags result)
{
if (isFreePlay){
if (target == null) return;

PlayerControl.LocalPlayer.MurderPlayer(target, MurderResultFlags.Succeeded);
return;

}

foreach (var item in PlayerControl.AllPlayerControls)
{
MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)RpcCalls.MurderPlayer, SendOption.None, AmongUsClient.Instance.GetClientIdFromCharacter(item));
writer.WriteNetObject(target);
writer.Write((int)result);
AmongUsClient.Instance.FinishRpcImmediately(writer);
}
PlayerControl.LocalPlayer.MurderPlayer(target, result);
}
// ==================================================================
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment block with "[FIX 2]" and separator lines appears to be temporary development documentation that should be cleaned up before merging. Consider replacing this with a standard documentation comment that explains the purpose and behavior of the murderPlayer method without referencing specific fixes or patch implementations.

Copilot uses AI. Check for mistakes.
Comment thread src/Patches/OtherPatches.cs Outdated
GameData_RemovePlayer_Patch.ClearNotifiedDisconnects();

// Clear the set of notified killed victims when a game ends.
PlayerControl_MurderPlayer_Patch.ClearNotifiedKilledVictims();
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OnGameEnd cleanup is missing a call to clear the vent tracking states. The PlayerPhysics_LateUpdate.ClearAllStates method should be called here to clear the wasInVent and lastKnownPositions dictionaries when the game ends. Without this, state from a previous game could persist into the next game, potentially causing incorrect notifications or memory leaks across multiple game sessions.

Suggested change
PlayerControl_MurderPlayer_Patch.ClearNotifiedKilledVictims();
PlayerControl_MurderPlayer_Patch.ClearNotifiedKilledVictims();
// Clear vent tracking state (wasInVent, lastKnownPositions) when a game ends.
PlayerPhysics_LateUpdate.ClearAllStates();

Copilot uses AI. Check for mistakes.
Comment thread src/Patches/PlayerPhysicsPatches.cs Outdated

if (wasInVent.TryGetValue(playerId, out bool previouslyInVent) && currentlyInVent != previouslyInVent)
{
Vector2 positionToCheck = currentlyInVent ? lastKnownPositions[playerId] : __instance.myPlayer.GetTruePosition();
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a potential KeyNotFoundException on line 37. When a player enters a vent for the first time (when currentlyInVent is true and previouslyInVent is false), the code tries to access lastKnownPositions[playerId], but this key may not exist yet if the player's state was just initialized. The code should check if the key exists in lastKnownPositions before accessing it, or use TryGetValue with a fallback position.

Suggested change
Vector2 positionToCheck = currentlyInVent ? lastKnownPositions[playerId] : __instance.myPlayer.GetTruePosition();
Vector2 positionToCheck;
if (currentlyInVent)
{
if (!lastKnownPositions.TryGetValue(playerId, out positionToCheck))
{
positionToCheck = __instance.myPlayer.GetTruePosition();
}
}
else
{
positionToCheck = __instance.myPlayer.GetTruePosition();
}

Copilot uses AI. Check for mistakes.
Comment thread src/Cheats/NotificationHandler.cs Outdated
Comment on lines +41 to +43
// Get the displayed (current outfit) name and color
string displayName = $"<color=#{ColorUtility.ToHtmlStringRGB(Palette.PlayerColors[player.CurrentOutfit.ColorId])}>{player.CurrentOutfit.PlayerName}</color>";

Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential IndexOutOfRangeException on line 42. The code accesses Palette.PlayerColors array using player.CurrentOutfit.ColorId without bounds checking. If ColorId is out of range (due to mods or data corruption), this will throw an exception. Consider adding bounds checking or using TryGetValue pattern to safely access the array.

Suggested change
// Get the displayed (current outfit) name and color
string displayName = $"<color=#{ColorUtility.ToHtmlStringRGB(Palette.PlayerColors[player.CurrentOutfit.ColorId])}>{player.CurrentOutfit.PlayerName}</color>";
// Get the displayed (current outfit) name and color, guarding against invalid ColorId values
var playerColors = Palette.PlayerColors;
int colorId = player.CurrentOutfit.ColorId;
Color displayColor;
if (playerColors != null && colorId >= 0 && colorId < playerColors.Length)
{
displayColor = playerColors[colorId];
}
else
{
// Fallback to the player's real color if the current outfit color is invalid
displayColor = player.Data.Color;
}
string displayName = $"<color=#{ColorUtility.ToHtmlStringRGB(displayColor)}>{player.CurrentOutfit.PlayerName}</color>";

Copilot uses AI. Check for mistakes.
Comment thread src/Patches/PlayerPhysicsPatches.cs Outdated
Comment on lines 75 to 82
foreach(GameObject bodyObject in bodyObjects)
{
DeadBody deadBody = bodyObject.GetComponent<DeadBody>();

if (deadBody){
if (!deadBody.Reported){ // Only draw tracers for unreported dead bodies
TracersHandler.drawBodyTracer(deadBody);
}
if (deadBody && !deadBody.Reported)
{
TracersHandler.drawBodyTracer(deadBody);
}
}
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This foreach loop immediately maps its iteration variable to another variable - consider mapping the sequence explicitly using '.Select(...)'.

Copilot uses AI. Check for mistakes.
Comment thread src/MalumMenu.cs Outdated
Harmony.PatchAll();

menuUI = AddComponent<MenuUI>();
notificationUI = AddComponent<NotificationUI>();
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Write to static field from instance method, property, or constructor.

Copilot uses AI. Check for mistakes.
Comment thread src/Cheats/NotificationHandler.cs Outdated
Comment on lines +64 to +71
if (isDisguised)
{
message = $"{realKillerName} (as {displayKillerName}) killed {victimName} in {roomName}.";
}
else
{
message = $"{realKillerName} killed {victimName} in {roomName}.";
}
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.

Copilot uses AI. Check for mistakes.
Comment thread src/Cheats/NotificationHandler.cs Outdated
Comment on lines +86 to +93
if (isDisguised)
{
message = $"{realKillerName} (as {displayKillerName}) tried to kill {targetName} in {roomName}. (Saved)";
}
else
{
message = $"{realKillerName} tried to kill {targetName} in {roomName}. (Saved)";
}
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.

Copilot uses AI. Check for mistakes.
Comment thread src/Cheats/NotificationHandler.cs Outdated
Comment on lines +105 to +112
if (isDisguised)
{
message = $"{realPlayerName} (as {displayPlayerName}) has {action} a vent in {roomName}.";
}
else
{
message = $"{realPlayerName} has {action} a vent in {roomName}.";
}
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.

Copilot uses AI. Check for mistakes.
@astra1dev
Copy link
Copy Markdown
Owner

I'm now rewriting this to use the existing ConsoleUI and maybe add some more events to log.

@ReactorCoreDev
Copy link
Copy Markdown

I'm now rewriting this to use the existing ConsoleUI and maybe add some more events to log.

👍

@ReactorCoreDev
Copy link
Copy Markdown

My guesses are:
On someone shapeshift
On someone phantom
On someone doing a task (possibly)
On someone complete task (possibly)

@astra1dev astra1dev merged commit 36b9f83 into astra1dev:reloaded Feb 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.