mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-18 04:10:36 +00:00
31 lines
738 B
C#
31 lines
738 B
C#
using HarmonyLib;
|
|
using QSB.Messaging;
|
|
using QSB.Patches;
|
|
using QSB.Tools.TranslatorTool.TranslationSync.Messages;
|
|
using QSB.Tools.TranslatorTool.TranslationSync.WorldObjects;
|
|
using QSB.WorldSync;
|
|
|
|
namespace QSB.Tools.TranslatorTool.TranslationSync.Patches;
|
|
|
|
internal class SpiralPatches : QSBPatch
|
|
{
|
|
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
|
|
|
[HarmonyPrefix]
|
|
[HarmonyPatch(typeof(NomaiText), nameof(NomaiText.SetAsTranslated))]
|
|
public static void SetAsTranslated(NomaiText __instance, int id)
|
|
{
|
|
if (__instance is GhostWallText)
|
|
{
|
|
return;
|
|
}
|
|
|
|
if (__instance.IsTranslated(id))
|
|
{
|
|
return;
|
|
}
|
|
|
|
__instance.GetWorldObject<QSBNomaiText>()
|
|
.SendMessage(new SetAsTranslatedMessage(id));
|
|
}
|
|
} |