This repository has been archived on 2026-05-30. You can view files and clone it, but cannot push or open issues or pull requests.
Files
2025-09-11 19:57:49 -04:00

44 lines
1.5 KiB
C#

using Il2CppInterop.Runtime;
using System.Collections.Generic;
using System.Linq;
using undead_universal_patch_il2cpp.Core.Config;
using UnityEngine;
namespace undead_universal_patch_il2cpp.Patches.Internals.NotificationTargets
{
public class MarqueeTexts : MonoBehaviour
{
void Start()
{
if (ServerPatchesConfig.CustomMarquee.Value)
{
UniversalPatchPlugin.Log.LogWarning("CustomMarquee patch is unavailable at this time. A future update may resolve this.");
//RecNetInteractions.onNotificationsOpen.Add(OnSocketOpen);
}
}
/*void OnSocketOpen()
{
var d = DelegateSupport.ConvertDelegate<RecNet.Notifications.NotificationHandler>(OnTextChange);
RecNet.Notifications.RegisterHandler("MarqueeTexts", d);
}
void OnTextChange(Dictionary<string, string> args)
{
GameObject go = GameObject.Find("DynamicObjects/[RecCenter_Marquee]");
string[] transforms = ["Text", "Now Playing", "SubText"];
var texts = transforms.Select(str => go.transform.Find(str).GetComponent<TextMesh>()).ToArray();
foreach (var t in transforms)
{
TextMesh tm = go.transform.Find(t).GetComponent<TextMesh>();
args.TryGetValue(t, out string res);
tm.text = res;
}
Core.Util.ConditionalDebug("Replaced marquee texts");
}*/
}
}