using BepInEx;
using HarmonyLib;
using SirW_CustomHints;
namespace MyMod
{
[BepInPlugin(MyPluginInfo.PLUGIN_GUID, MyPluginInfo.PLUGIN_NAME, MyPluginInfo.PLUGIN_VERSION)]
[BepInDependency("SirW_CustomHints", BepInDependency.DependencyFlags.HardDependency)]
public class Plugin : BasePlugin
{
// 用于已翻译的提示。这些是可选的。
private static CustomTranslatedHints customTranslatedHints = new CustomTranslatedHints();
public override void Load()
{
// 将自定义函数附加到短信代码。
Harmony.CreateAndPatchAll(typeof(Plugin));
}
// 与电脑互动时添加提示。
[HarmonyPatch(typeof(ComputerInteraction), nameof(ComputerInteraction.DefaultHint))]
[HarmonyPostfix]
static void ComputerExample(ComputerInteraction __instance, bool show)
{
// 仅当 ComputerInteraction.DefaultHint 设置为显示时,才添加提示。
if (show)
{
// 基础提示。
CustomHints.AddHint(HintIcons.R, "基础提示");
// 包含多个按键的提示。
自定义提示.添加提示([提示图标.右键, 提示图标.暂停], "多键操作");
// 提示使用 UnityEngine.KeyCode。
CustomHints.AddHint(HintIcons.GetKeyFromCode(KeyCode.R), "按键提示");
// 增加提示窗口宽度。
CustomHints.AddHint(HintIcons.W, "更宽的提示", 350f);
// 永久提示。
CustomHints.AddHint(HintIcons.P, "永久提示", null, true);
// 显示翻译后的提示。
customTranslatedHints.AddHint(HintIcons.T, "translated_hint")
}
}
// 创建翻译的方法。
private static void CreateTranslation()
{
translated_hint
LocalizedStrings localizedStrings = new LocalizedStrings();
localizedStrings["en"] = "翻译提示";
localizedStrings["de"] = "翻译后的提示";
localizedStrings["es-ES"] = "翻译后的曲目";
localizedStrings["da-DK"] = "翻译提示";
// 如果列表已存在,则直接更新它。
TranslationEntry existingKey = customTranslatedHints.Translations.FirstOrDefault(x => x.TranslationKey == translationKey);
if (existingKey != null)
{
existingKey.LocalizedStrings.Merge(localizedStrings);
}
否则
{
TranslationEntry translationEntry = new TranslationEntry(translationKey, localizedStrings);
customTranslatedHints.Translations.Add(translationEntry);
}
}
}
}
Tobey的《超市模拟器》BepInEx整合包
toebeann2026-07-29 01:39:09
兼容SMS v1.6!适用于《超市模拟器》的BepInEx整合包,已预先配置好,可直接在Windows和Linux上使用,包括SteamOS和Steam Deck掌机!

破风漫画
AstaKunTV2026-08-05 21:02:25
小型模组,增加了包含漫画的许可证!小模组,添加了带有漫画的许可证!

地板和墙面涂刷器
tomcyk912026-08-24 14:11:14
只需一个普通操作即可更改整个楼层或整面直墙——仅在你想要时。

号角零食
wayne17172026-09-02 03:59:13
这个附加的号角零食

塔托皮肤
wayne17172026-09-02 04:10:05
Add的纹身皮肤

雷叔叔薯片
wayne17172026-09-02 04:18:06
这加了雷叔叔的薯片

Utz小吃店
wayne17172026-09-02 04:33:24
Add的Utz零食店

托斯蒂托斯薯片
wayne17172026-09-02 08:11:59
这个添加了托斯蒂托斯玉米片