mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
Add Translation API
This commit is contained in:
1 parent
535967475d
commit
0b81a8808a
67 files changed
+628
-145
No files matched your search
@@ -13,7 +13,7 @@ namespace MiraAPI.Example.Buttons.Freezer;
|
||||
|
||||
public class FreezeButton : CustomActionButton<PlayerControl>
|
||||
{
|
||||
public override string Name => "Freeze";
|
||||
public override string Name => "button.freeze.name";
|
||||
|
||||
public override float Cooldown => OptionGroupSingleton<FreezerRoleSettings>.Instance.FreezeDuration;
|
||||
public override bool PauseTimerInVent => true;
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace MiraAPI.Example.Buttons;
|
||||
|
||||
public class MeetingButton : CustomActionButton
|
||||
{
|
||||
public override string Name => "Call Meeting";
|
||||
public override string Name => "button.callMeeting.name";
|
||||
|
||||
public override float Cooldown => 15;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace MiraAPI.Example.Buttons;
|
||||
|
||||
public class NeutralKillerButton : CustomActionButton
|
||||
{
|
||||
public override string Name => "Win Game";
|
||||
public override string Name => "button.winGame.name";
|
||||
public override float Cooldown => 0f;
|
||||
public override LoadableAsset<Sprite> Sprite => ExampleAssets.ExampleButton;
|
||||
public override MiraKeybind Keybind => ExampleKeybinds.NeutralWinKeybind;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace MiraAPI.Example.Buttons.Teleporter;
|
||||
|
||||
public class TeleportButton : CustomActionButton
|
||||
{
|
||||
public override string Name => "Teleport";
|
||||
public override string Name => "button.teleport.name";
|
||||
|
||||
public override float Cooldown => OptionGroupSingleton<TeleporterOptions>.Instance.TeleportCooldown.Value;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using MiraAPI.Hud;
|
||||
using MiraAPI.Translation;
|
||||
using MiraAPI.Utilities.Assets;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -6,7 +7,7 @@ namespace MiraAPI.Example.Buttons;
|
||||
|
||||
public class ThinkButton : CustomActionButton
|
||||
{
|
||||
public override string Name => "Think";
|
||||
public override string Name => "button.think.name";
|
||||
public override float Cooldown => 15f;
|
||||
public override float EffectDuration => 10f;
|
||||
public override int MaxUses => 1;
|
||||
@@ -14,13 +15,12 @@ public class ThinkButton : CustomActionButton
|
||||
public override LoadableAsset<Sprite> Sprite => ExampleAssets.ExampleButton;
|
||||
protected override void OnClick()
|
||||
{
|
||||
// This button does absolutely nothing besides changing its text
|
||||
Button!.OverrideText("Thinking...");
|
||||
Button!.OverrideText("button.think.thinking".Translate());
|
||||
}
|
||||
|
||||
public override void OnEffectEnd()
|
||||
{
|
||||
Button!.OverrideText("Think");
|
||||
Button!.OverrideText("button.think.name".Translate());
|
||||
}
|
||||
|
||||
public override bool IsEffectCancellable()
|
||||
|
||||
@@ -6,12 +6,12 @@ namespace MiraAPI.Example;
|
||||
[RegisterCustomColors]
|
||||
public static class ExampleColors
|
||||
{
|
||||
public static CustomColor Cerulean { get; } = new("Cerulean", new Color(0.0f, 0.48f, 0.65f))
|
||||
public static CustomColor Cerulean { get; } = new("color.cerulean", new Color(0.0f, 0.48f, 0.65f))
|
||||
{
|
||||
ColorBrightness = CustomColorBrightness.Lighter,
|
||||
};
|
||||
|
||||
public static CustomColor Rose { get; } = new("Rose", new Color(0.98f, 0.26f, 0.62f));
|
||||
public static CustomColor Rose { get; } = new("color.rose", new Color(0.98f, 0.26f, 0.62f));
|
||||
|
||||
public static CustomColor Gold { get; } = new("Gold", new Color(1.0f, 0.84f, 0.0f));
|
||||
public static CustomColor Gold { get; } = new("color.gold", new Color(1.0f, 0.84f, 0.0f));
|
||||
}
|
||||
@@ -8,7 +8,7 @@ namespace MiraAPI.Example;
|
||||
|
||||
public class ExampleLocalSettings(ConfigFile config) : LocalSettingsTab(config)
|
||||
{
|
||||
public override string TabName => "Mira Example";
|
||||
public override string TabName => "settings.miraExample.name";
|
||||
protected override bool ShouldCreateLabels => false;
|
||||
|
||||
public override LocalSettingTabAppearance TabAppearance => new()
|
||||
@@ -18,7 +18,7 @@ public class ExampleLocalSettings(ConfigFile config) : LocalSettingsTab(config)
|
||||
};
|
||||
|
||||
[LocalSettingsButton]
|
||||
public LocalSettingsButton ExampleButton { get; private set; } = new("Example Button", OnExampleButtonClick);
|
||||
public LocalSettingsButton ExampleButton { get; private set; } = new("settings.miraExample.button.exampleButton", OnExampleButtonClick);
|
||||
|
||||
[LocalToggleSetting]
|
||||
public ConfigEntry<bool> ExampleToggle { get; private set; } = config.Bind("General", "Example Bool", true);
|
||||
|
||||
@@ -3,6 +3,7 @@ using BepInEx.Configuration;
|
||||
using BepInEx.Unity.IL2CPP;
|
||||
using HarmonyLib;
|
||||
using MiraAPI.PluginLoading;
|
||||
using MiraAPI.Translation;
|
||||
using Reactor;
|
||||
using Reactor.Networking;
|
||||
using Reactor.Networking.Attributes;
|
||||
@@ -16,6 +17,10 @@ namespace MiraAPI.Example;
|
||||
[ReactorModFlags(ModFlags.RequireOnAllClients)]
|
||||
public partial class ExamplePlugin : BasePlugin, IMiraPlugin
|
||||
{
|
||||
public ExamplePlugin()
|
||||
{
|
||||
TranslationManager.Register("mira.example");
|
||||
}
|
||||
public Harmony Harmony { get; } = new(Id);
|
||||
public string OptionsTitleText => "Mira API\nExample Mod";
|
||||
public ConfigFile GetConfigFile() => Config;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using MiraAPI.Example.Roles;
|
||||
using MiraAPI.GameEnd;
|
||||
using MiraAPI.Translation;
|
||||
using MiraAPI.Utilities;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -14,7 +15,7 @@ public class NeutralKillerGameOver : CustomGameOver
|
||||
|
||||
public override void AfterEndGameSetup(EndGameManager endGameManager)
|
||||
{
|
||||
endGameManager.WinText.text = "Outcast Killer Wins!";
|
||||
endGameManager.WinText.text = "gameover.outcastKiller.win".Translate();
|
||||
endGameManager.WinText.color = Color.magenta;
|
||||
endGameManager.BackgroundBar.material.SetColor(ShaderID.Color, Color.magenta);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using MiraAPI.GameOptions;
|
||||
using MiraAPI.Modifiers;
|
||||
using MiraAPI.Modifiers.Types;
|
||||
|
||||
using MiraAPI.Utilities.Assets;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -9,7 +10,7 @@ namespace MiraAPI.Example.Modifiers;
|
||||
|
||||
public class CaptainModifier : GameModifier
|
||||
{
|
||||
public override string ModifierName => "Captain";
|
||||
public override string ModifierName => "modifier.captain.name";
|
||||
public override LoadableAsset<Sprite>? ModifierIcon => ExampleAssets.CallMeetingButton;
|
||||
|
||||
public override void OnDeath(DeathReason reason)
|
||||
@@ -19,7 +20,7 @@ public class CaptainModifier : GameModifier
|
||||
|
||||
public override string GetDescription()
|
||||
{
|
||||
return $"You can call a meeting from anywhere on the map.";
|
||||
return "modifier.captain.description";
|
||||
}
|
||||
|
||||
public override int GetAssignmentChance()
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace MiraAPI.Example.Modifiers.Freezer;
|
||||
|
||||
public class FreezeModifier : TimedModifier
|
||||
{
|
||||
public override string ModifierName => "Freezed";
|
||||
public override string ModifierName => "modifier.freezed.name";
|
||||
public override bool HideOnUi => false;
|
||||
public override float Duration => 15f;
|
||||
public override bool AutoStart => true;
|
||||
|
||||
@@ -4,11 +4,11 @@ namespace MiraAPI.Example.Modifiers;
|
||||
|
||||
public class HighPriorityModifier : GameModifier
|
||||
{
|
||||
public override string ModifierName => "High Priority";
|
||||
public override string ModifierName => "modifier.highPriority.name";
|
||||
|
||||
public override string GetDescription()
|
||||
{
|
||||
return "You are high priority! Idrk what this means either tbh...";
|
||||
return "modifier.highPriority.description";
|
||||
}
|
||||
|
||||
public override int GetAssignmentChance()
|
||||
|
||||
@@ -7,19 +7,19 @@ namespace MiraAPI.Example.Options;
|
||||
|
||||
public class ExampleOptions : AbstractOptionGroup
|
||||
{
|
||||
public override string GroupName => "Example Options 1";
|
||||
public override string GroupName => "options.exampleOptions1.name";
|
||||
public override Color GroupColor => Color.green;
|
||||
|
||||
[ModdedToggleOption("Toggle Opt 1")]
|
||||
[ModdedToggleOption("options.exampleOptions1.toggleOpt1")]
|
||||
public bool ToggleOpt { get; set; } = false;
|
||||
|
||||
[ModdedToggleOption("Toggle Opt 2")]
|
||||
[ModdedToggleOption("options.exampleOptions1.toggleOpt1")]
|
||||
public bool ToggleOpt2 { get; set; } = true;
|
||||
|
||||
[ModdedNumberOption("Number Opt", min: 0, max: 10, increment: .25f, formatString: "0.00", suffixType: MiraNumberSuffixes.Percent)]
|
||||
[ModdedNumberOption("options.exampleOptions1.numberOpt", min: 0, max: 10, increment: .25f, formatString: "0.00", suffixType: MiraNumberSuffixes.Percent)]
|
||||
public float NumberOpt { get; set; } = 4f;
|
||||
|
||||
[ModdedEnumOption("Best API", typeof(BestApi), ["Mira API", "Mitochondria", "Reactor"])]
|
||||
[ModdedEnumOption("options.exampleOptions1.bestApi", typeof(BestApi), ["Mira API", "Mitochondria", "Reactor"])]
|
||||
public BestApi Opt { get; set; } = BestApi.MiraAPI;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,22 +6,22 @@ namespace MiraAPI.Example.Options;
|
||||
|
||||
public class ExampleOptions2 : AbstractOptionGroup
|
||||
{
|
||||
public override string GroupName => "Example Options 2";
|
||||
public override string GroupName => "options.exampleOptions2.name";
|
||||
|
||||
public override uint GroupPriority => 0; // This group will be displayed first. The default value is uint.MaxValue.
|
||||
|
||||
public override MenuCategory ParentMenu => MenuCategory.CustomTwo;
|
||||
|
||||
public ModdedPlayerOption PlayerOption2 { get; } = new("YOU MUST CHOSE A PLAYER", false);
|
||||
public ModdedPlayerOption PlayerOption { get; } = new("Eh whatever");
|
||||
public ModdedToggleOption ToggleOpt1 { get; } = new("Toggle Option 1", false);
|
||||
public ModdedPlayerOption PlayerOption2 { get; } = new("options.exampleOptions2.youMustChoseAPlayer", false);
|
||||
public ModdedPlayerOption PlayerOption { get; } = new("options.exampleOptions2.ehWhatever");
|
||||
public ModdedToggleOption ToggleOpt1 { get; } = new("options.exampleOptions2.toggleOption1", false);
|
||||
|
||||
public ModdedToggleOption ToggleOpt2 { get; } = new("Toggle Option 2", false)
|
||||
public ModdedToggleOption ToggleOpt2 { get; } = new("options.exampleOptions2.toggleOption2", false)
|
||||
{
|
||||
Visible = () => OptionGroupSingleton<ExampleOptions2>.Instance.ToggleOpt1, // implicit cast from ModdedToggleOption to bool
|
||||
};
|
||||
|
||||
public ModdedEnumOption<TestingData> EnumOpt { get; } = new("Enum Opt", 0)
|
||||
public ModdedEnumOption<TestingData> EnumOpt { get; } = new("options.exampleOptions2.enumOpt", 0)
|
||||
{
|
||||
ChangedEvent = x => Logger<ExamplePlugin>.Info($"changed Enum Opt to {x}"),
|
||||
};
|
||||
|
||||
@@ -6,14 +6,14 @@ namespace MiraAPI.Example.Options.Modifiers;
|
||||
|
||||
public class CaptainModifierSettings : AbstractOptionGroup<CaptainModifier>
|
||||
{
|
||||
public override string GroupName => "Captain Settings";
|
||||
public override string GroupName => "options.captainSettings.name";
|
||||
|
||||
[ModdedNumberOption("Amount", 0, 5)]
|
||||
[ModdedNumberOption("options.captainSettings.amount", 0, 5)]
|
||||
public float Amount { get; set; } = 1;
|
||||
|
||||
[ModdedNumberOption("Chance", 0, 100, 10)]
|
||||
[ModdedNumberOption("options.captainSettings.chance", 0, 100, 10)]
|
||||
public float Chance { get; set; } = 50;
|
||||
|
||||
[ModdedNumberOption("Uses", 1, 5)]
|
||||
[ModdedNumberOption("options.captainSettings.uses", 1, 5)]
|
||||
public float NumUses { get; set; } = 3;
|
||||
}
|
||||
@@ -6,8 +6,8 @@ namespace MiraAPI.Example.Options.Modifiers;
|
||||
|
||||
public class FreezeModifierSettings : AbstractOptionGroup<FreezeModifier>
|
||||
{
|
||||
public override string GroupName => "Freeze";
|
||||
public override string GroupName => "options.freezeModifierSettings.name";
|
||||
|
||||
[ModdedToggleOption("Use Color")]
|
||||
[ModdedToggleOption("options.freezeModifierSettings.useColor")]
|
||||
public bool UseColor { get; set; } = true;
|
||||
}
|
||||
@@ -5,15 +5,15 @@ namespace MiraAPI.Example.Options.Modifiers;
|
||||
|
||||
public class GeneralModifierOptions : AbstractOptionGroup
|
||||
{
|
||||
public override string GroupName => "General";
|
||||
public override string GroupName => "options.generalModifier.name";
|
||||
|
||||
public override uint GroupPriority => 0;
|
||||
|
||||
public override MenuCategory ParentMenu => MenuCategory.Modifiers;
|
||||
|
||||
[ModdedToggleOption("Some Boolean Option")]
|
||||
[ModdedToggleOption("options.generalModifier.someBooleanOption")]
|
||||
public bool SomeBooleanOption { get; set; } = true;
|
||||
|
||||
[ModdedNumberOption("Number Option", 0, 10, 1)]
|
||||
[ModdedNumberOption("options.generalModifier.numberOption", 0, 10, 1)]
|
||||
public float NumberOption { get; set; } = 5;
|
||||
}
|
||||
@@ -13,11 +13,11 @@ public class FreezerRoleSettings : AbstractOptionGroup<FreezerRole>
|
||||
TmpSpriteUtils.CreateSpriteAsset(
|
||||
MiraAssets.ImpostorFile.LoadAsset(),
|
||||
"ApiExample.Role.Impostor.FreezerRole"));
|
||||
public override string GroupName => "Custom Role";
|
||||
public override string GroupName => "options.freezerRoleSettings.name";
|
||||
|
||||
[ModdedNumberOption("Freeze Duration", 1, 15, 1, MiraNumberSuffixes.Seconds)]
|
||||
[ModdedNumberOption("options.freezerRoleSettings.freezeDuration", 1, 15, 1, MiraNumberSuffixes.Seconds)]
|
||||
public float FreezeDuration { get; set; } = 5;
|
||||
|
||||
[ModdedNumberOption("Freeze Uses", 1, 5)]
|
||||
[ModdedNumberOption("options.freezerRoleSettings.freezeUses", 1, 5)]
|
||||
public float FreezeUses { get; set; } = 1;
|
||||
}
|
||||
@@ -8,13 +8,13 @@ namespace MiraAPI.Example.Options.Roles;
|
||||
|
||||
public class TeleporterOptions : AbstractRoleOptionGroup<TeleporterRole>
|
||||
{
|
||||
public override string GroupName => "Teleporter";
|
||||
public override string GroupName => "options.teleporterOptions.name";
|
||||
|
||||
public ModdedNumberOption TeleportCooldown { get; set; } = new("Teleport Cooldown", 10, 5, 60, 2.5f, MiraNumberSuffixes.Seconds);
|
||||
public ModdedNumberOption TeleportCooldown { get; set; } = new("options.teleporterOptions.teleportCooldown", 10, 5, 60, 2.5f, MiraNumberSuffixes.Seconds);
|
||||
|
||||
[ModdedNumberOption("Teleport Duration", 5, 25, 1, MiraNumberSuffixes.Seconds)]
|
||||
[ModdedNumberOption("options.teleporterOptions.teleportDuration", 5, 25, 1, MiraNumberSuffixes.Seconds)]
|
||||
public float TeleportDuration { get; set; } = 10;
|
||||
|
||||
[ModdedNumberOption("Zoom Distance", 4, 15)]
|
||||
[ModdedNumberOption("options.teleporterOptions.zoomDistance", 4, 15)]
|
||||
public float ZoomDistance { get; set; } = 6;
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<resources>
|
||||
<string name="teleporter.name">Teleporter</string>
|
||||
<string name="teleporter.description">Zoom out and teleport across the map!</string>
|
||||
<string name="freezer.name">Freezer</string>
|
||||
<string name="freezer.description">Freeze another player for a duration of time.</string>
|
||||
<string name="mayor.name">Mayor</string>
|
||||
<string name="mayor.description">You get extra votes!</string>
|
||||
<string name="chamelon.name">Chamelon</string>
|
||||
<string name="chamelon.description">Stay invisible while not moving.</string>
|
||||
<string name="outcastKiller.name">Outcast Killer</string>
|
||||
<string name="outcastKiller.description">Outcast who can kill.</string>
|
||||
<string name="outcast.name">Outcast</string>
|
||||
<string name="outcast.roleTitle">OUTCAST</string>
|
||||
<string name="outcast.teamIntroDescription">You are an Outcast. You do not have a team.</string>
|
||||
<string name="button.think.name">Think</string>
|
||||
<string name="button.think.thinking">Thinking...</string>
|
||||
<string name="button.freeze.name">Freeze</string>
|
||||
<string name="button.teleport.name">Teleport</string>
|
||||
<string name="button.callMeeting.name">Call Meeting</string>
|
||||
<string name="button.winGame.name">Win Game</string>
|
||||
<string name="modifier.captain.name">Captain</string>
|
||||
<string name="modifier.captain.description">You can call a meeting from anywhere on the map.</string>
|
||||
<string name="modifier.freezed.name">Freezed</string>
|
||||
<string name="modifier.highPriority.name">High Priority</string>
|
||||
<string name="modifier.highPriority.description">You are high priority! Idrk what this means either tbh...</string>
|
||||
<string name="options.exampleOptions1.name">Example Options 1</string>
|
||||
<string name="options.exampleOptions1.toggleOpt1">Toggle Opt 1</string>
|
||||
<string name="options.exampleOptions1.toggleOpt2">Toggle Opt 2</string>
|
||||
<string name="options.exampleOptions1.numberOpt">Number Opt</string>
|
||||
<string name="options.exampleOptions1.bestApi">Best API</string>
|
||||
<string name="options.exampleOptions2.name">Example Options 2</string>
|
||||
<string name="options.exampleOptions2.youMustChoseAPlayer">YOU MUST CHOSE A PLAYER</string>
|
||||
<string name="options.exampleOptions2.ehWhatever">Eh whatever</string>
|
||||
<string name="options.exampleOptions2.toggleOption1">Toggle Option 1</string>
|
||||
<string name="options.exampleOptions2.toggleOption2">Toggle Option 2</string>
|
||||
<string name="options.exampleOptions2.enumOpt">Enum Opt</string>
|
||||
<string name="options.captainSettings.name">Captain Settings</string>
|
||||
<string name="options.captainSettings.amount">Amount</string>
|
||||
<string name="options.captainSettings.chance">Chance</string>
|
||||
<string name="options.captainSettings.uses">Uses</string>
|
||||
<string name="options.freezeModifierSettings.name">Freeze</string>
|
||||
<string name="options.freezeModifierSettings.useColor">Use Color</string>
|
||||
<string name="options.generalModifier.name">General</string>
|
||||
<string name="options.generalModifier.someBooleanOption">Some Boolean Option</string>
|
||||
<string name="options.generalModifier.numberOption">Number Option</string>
|
||||
<string name="options.freezerRoleSettings.name">Custom Role</string>
|
||||
<string name="options.freezerRoleSettings.freezeDuration">Freeze Duration</string>
|
||||
<string name="options.freezerRoleSettings.freezeUses">Freeze Uses</string>
|
||||
<string name="options.teleporterOptions.name">Teleporter</string>
|
||||
<string name="options.teleporterOptions.teleportCooldown">Teleport Cooldown</string>
|
||||
<string name="options.teleporterOptions.teleportDuration">Teleport Duration</string>
|
||||
<string name="options.teleporterOptions.zoomDistance">Zoom Distance</string>
|
||||
<string name="settings.miraExample.name">Mira Example</string>
|
||||
<string name="settings.miraExample.exampleBool">Example Bool</string>
|
||||
<string name="settings.miraExample.exampleBool2">Example Bool 2</string>
|
||||
<string name="settings.miraExample.slider">Slider</string>
|
||||
<string name="settings.miraExample.exampleNumber">Example Number</string>
|
||||
<string name="settings.miraExample.exampleMultiplier">Example Multplier</string>
|
||||
<string name="settings.miraExample.exampleEnum">Example Enum</string>
|
||||
<string name="settings.miraExample.button.exampleButton">Example Button</string>
|
||||
<string name="gameover.outcastKiller.win">Outcast Killer Wins!</string>
|
||||
<string name="color.cerulean">Cerulean</string>
|
||||
<string name="color.rose">Rose</string>
|
||||
<string name="color.gold">Gold</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,66 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<resources>
|
||||
<string name="teleporter.name">传送者</string>
|
||||
<string name="teleporter.description">缩小视野并在地图上传送!</string>
|
||||
<string name="freezer.name">冰冻者</string>
|
||||
<string name="freezer.description">将其他玩家冰冻一段时间。</string>
|
||||
<string name="mayor.name">市长</string>
|
||||
<string name="mayor.description">你拥有额外投票权!</string>
|
||||
<string name="chamelon.name">变色龙</string>
|
||||
<string name="chamelon.description">静止不动时保持隐身。</string>
|
||||
<string name="outcastKiller.name">流放杀手</string>
|
||||
<string name="outcastKiller.description">可以击杀的流放者。</string>
|
||||
<string name="outcast.name">流放者</string>
|
||||
<string name="outcast.roleTitle">流放者</string>
|
||||
<string name="outcast.teamIntroDescription">你是流放者,你没有队伍。</string>
|
||||
<string name="button.think.name">思考</string>
|
||||
<string name="button.think.thinking">思考中...</string>
|
||||
<string name="button.freeze.name">冰冻</string>
|
||||
<string name="button.teleport.name">传送</string>
|
||||
<string name="button.callMeeting.name">召集会议</string>
|
||||
<string name="button.winGame.name">赢得游戏</string>
|
||||
<string name="modifier.captain.name">队长</string>
|
||||
<string name="modifier.captain.description">你可以在地图上任意位置召集会议。</string>
|
||||
<string name="modifier.freezed.name">已被冰冻</string>
|
||||
<string name="modifier.highPriority.name">高优先级</string>
|
||||
<string name="modifier.highPriority.description">你是高优先级!老实说我也不太清楚这是什么意思……</string>
|
||||
<string name="options.exampleOptions1.name">示例选项组 1</string>
|
||||
<string name="options.exampleOptions1.toggleOpt1">开关选项 1</string>
|
||||
<string name="options.exampleOptions1.toggleOpt2">开关选项 2</string>
|
||||
<string name="options.exampleOptions1.numberOpt">数字选项</string>
|
||||
<string name="options.exampleOptions1.bestApi">谁是最好的API</string>
|
||||
<string name="options.exampleOptions2.name">示例选项组 2</string>
|
||||
<string name="options.exampleOptions2.youMustChoseAPlayer">你必须选择一个玩家</string>
|
||||
<string name="options.exampleOptions2.ehWhatever">咕咕嘎嘎</string>
|
||||
<string name="options.exampleOptions2.toggleOption1">开关选项 1</string>
|
||||
<string name="options.exampleOptions2.toggleOption2">开关选项 2</string>
|
||||
<string name="options.exampleOptions2.enumOpt">枚举选项</string>
|
||||
<string name="options.captainSettings.name">队长设置</string>
|
||||
<string name="options.captainSettings.amount">数量</string>
|
||||
<string name="options.captainSettings.chance">概率</string>
|
||||
<string name="options.captainSettings.uses">使用次数</string>
|
||||
<string name="options.freezeModifierSettings.name">冰冻</string>
|
||||
<string name="options.freezeModifierSettings.useColor">使用颜色</string>
|
||||
<string name="options.generalModifier.name">通用</string>
|
||||
<string name="options.generalModifier.someBooleanOption">某个布尔选项</string>
|
||||
<string name="options.generalModifier.numberOption">数字选项</string>
|
||||
<string name="options.freezerRoleSettings.name">自定义职业</string>
|
||||
<string name="options.freezerRoleSettings.freezeDuration">冰冻时长</string>
|
||||
<string name="options.freezerRoleSettings.freezeUses">冰冻次数</string>
|
||||
<string name="options.teleporterOptions.name">传送者</string>
|
||||
<string name="options.teleporterOptions.teleportCooldown">传送冷却</string>
|
||||
<string name="options.teleporterOptions.teleportDuration">传送持续时间</string>
|
||||
<string name="options.teleporterOptions.zoomDistance">缩放距离</string>
|
||||
<string name="settings.miraExample.name">Mira 示例插件</string>
|
||||
<string name="settings.miraExample.exampleBool">示例布尔</string>
|
||||
<string name="settings.miraExample.exampleBool2">示例布尔 2</string>
|
||||
<string name="settings.miraExample.slider">滑块</string>
|
||||
<string name="settings.miraExample.exampleNumber">示例数字</string>
|
||||
<string name="settings.miraExample.exampleMultiplier">示例倍数</string>
|
||||
<string name="settings.miraExample.exampleEnum">示例枚举</string>
|
||||
<string name="settings.miraExample.button.exampleButton">示例按钮</string>
|
||||
<string name="gameover.outcastKiller.win">流放杀手获胜!</string>
|
||||
<string name="color.cerulean">天蓝</string>
|
||||
<string name="color.rose">玫瑰红</string>
|
||||
<string name="color.gold">金色</string>
|
||||
</resources>
|
||||
@@ -10,8 +10,8 @@ namespace MiraAPI.Example.Roles;
|
||||
|
||||
public class ChameloenRole : CrewmateRole, ICustomRole
|
||||
{
|
||||
public string RoleName => "Chamelon";
|
||||
public string RoleLongDescription => "Stay invisible while not moving.";
|
||||
public string RoleName => "chamelon.name";
|
||||
public string RoleLongDescription => "chamelon.description";
|
||||
public string RoleDescription => RoleLongDescription;
|
||||
public Color RoleColor => Palette.AcceptedGreen;
|
||||
public ModdedRoleTeams Team => ModdedRoleTeams.Crewmate;
|
||||
|
||||
@@ -6,8 +6,8 @@ namespace MiraAPI.Example.Roles;
|
||||
|
||||
public class FreezerRole : ImpostorRole, ICustomRole
|
||||
{
|
||||
public string RoleName => "Freezer";
|
||||
public string RoleLongDescription => "Freeze another player for a duration of time.";
|
||||
public string RoleName => "freezer.name";
|
||||
public string RoleLongDescription => "freezer.description";
|
||||
public string RoleDescription => RoleLongDescription;
|
||||
public Color RoleColor => Palette.Blue;
|
||||
public ModdedRoleTeams Team => ModdedRoleTeams.Impostor;
|
||||
|
||||
@@ -5,8 +5,8 @@ namespace MiraAPI.Example.Roles;
|
||||
|
||||
public class MayorRole : CrewmateRole, ICustomRole
|
||||
{
|
||||
public string RoleName => "Mayor";
|
||||
public string RoleLongDescription => "You get extra votes!";
|
||||
public string RoleName => "mayor.name";
|
||||
public string RoleLongDescription => "mayor.description";
|
||||
public string RoleDescription => RoleLongDescription;
|
||||
public Color RoleColor => new Color32(221, 176, 152, 255);
|
||||
public ModdedRoleTeams Team => ModdedRoleTeams.Crewmate;
|
||||
|
||||
@@ -8,8 +8,8 @@ namespace MiraAPI.Example.Roles;
|
||||
|
||||
public class NeutralKillerRole : ImpostorRole, ICustomRole
|
||||
{
|
||||
public string RoleName => "Outcast Killer";
|
||||
public string RoleDescription => "Outcast who can kill.";
|
||||
public string RoleName => "outcastKiller.name";
|
||||
public string RoleDescription => "outcastKiller.description";
|
||||
public string RoleLongDescription => RoleDescription;
|
||||
public Color RoleColor => Color.magenta;
|
||||
public ModdedRoleTeams Team => ModdedRoleTeams.Custom;
|
||||
@@ -21,13 +21,13 @@ public class NeutralKillerRole : ImpostorRole, ICustomRole
|
||||
CanUseVent = true,
|
||||
};
|
||||
|
||||
public RoleOptionsGroup RoleOptionsGroup { get; } = new("Outcast", Color.gray);
|
||||
public RoleOptionsGroup RoleOptionsGroup { get; } = new("outcast.name", Color.gray);
|
||||
|
||||
[HideFromIl2Cpp]
|
||||
public TeamIntroConfiguration? IntroConfiguration { get; } = new(
|
||||
Color.gray,
|
||||
"OUTCAST",
|
||||
"You are an Outcast. You do not have a team.");
|
||||
"outcast.roleTitle",
|
||||
"outcast.teamIntroDescription");
|
||||
|
||||
public override void SpawnTaskHeader(PlayerControl playerControl)
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@ namespace MiraAPI.Example.Roles;
|
||||
|
||||
public class TeleporterRole : CrewmateRole, ICustomRole
|
||||
{
|
||||
public string RoleName => "Teleporter";
|
||||
public string RoleLongDescription => "Zoom out and teleport across the map!";
|
||||
public string RoleName => "teleporter.name";
|
||||
public string RoleLongDescription => "teleporter.description";
|
||||
public string RoleDescription => RoleLongDescription;
|
||||
public Color RoleColor => new Color32(221, 176, 152, 255);
|
||||
public ModdedRoleTeams Team => ModdedRoleTeams.Crewmate;
|
||||
|
||||
Reference in new issue
Block a user