mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
Fix localization being applied
This commit is contained in:
1 parent
276ab0ac79
commit
4206b74d12
26 files changed
+163
-145
No files matched your search
@@ -13,7 +13,7 @@ namespace MiraAPI.Example.Buttons.Freezer;
|
||||
|
||||
public class FreezeButton : CustomActionButton<PlayerControl>
|
||||
{
|
||||
public override string Name => "button.freeze.name";
|
||||
public override string Name => "button.freeze";
|
||||
|
||||
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 => "button.callMeeting.name";
|
||||
public override string Name => "button.callMeeting";
|
||||
|
||||
public override float Cooldown => 15;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace MiraAPI.Example.Buttons;
|
||||
|
||||
public class NeutralKillerButton : CustomActionButton
|
||||
{
|
||||
public override string Name => "button.winGame.name";
|
||||
public override string Name => "button.winGame";
|
||||
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 => "button.teleport.name";
|
||||
public override string Name => "button.teleport";
|
||||
|
||||
public override float Cooldown => OptionGroupSingleton<TeleporterOptions>.Instance.TeleportCooldown.Value;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace MiraAPI.Example.Buttons;
|
||||
|
||||
public class ThinkButton : CustomActionButton
|
||||
{
|
||||
public override string Name => "button.think.name";
|
||||
public override string Name => "button.think";
|
||||
public override float Cooldown => 15f;
|
||||
public override float EffectDuration => 10f;
|
||||
public override int MaxUses => 1;
|
||||
@@ -20,7 +20,7 @@ public class ThinkButton : CustomActionButton
|
||||
|
||||
public override void OnEffectEnd()
|
||||
{
|
||||
Button!.OverrideText("button.think.name".Translate());
|
||||
Button!.OverrideText("button.think".Translate());
|
||||
}
|
||||
|
||||
public override bool IsEffectCancellable()
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace MiraAPI.Example;
|
||||
|
||||
public class ExampleLocalSettings(ConfigFile config) : LocalSettingsTab(config)
|
||||
{
|
||||
public override string TabName => "settings.miraExample.name";
|
||||
public override string TabName => "settings.miraExample";
|
||||
protected override bool ShouldCreateLabels => false;
|
||||
|
||||
public override LocalSettingTabAppearance TabAppearance => new()
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace MiraAPI.Example.Modifiers;
|
||||
|
||||
public class CaptainModifier : GameModifier
|
||||
{
|
||||
public override string ModifierName => "modifier.captain.name";
|
||||
public override string ModifierName => "modifier.captain";
|
||||
public override LoadableAsset<Sprite>? ModifierIcon => ExampleAssets.CallMeetingButton;
|
||||
|
||||
public override void OnDeath(DeathReason reason)
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace MiraAPI.Example.Modifiers.Freezer;
|
||||
|
||||
public class FreezeModifier : TimedModifier
|
||||
{
|
||||
public override string ModifierName => "modifier.freezed.name";
|
||||
public override string ModifierName => "modifier.freezed";
|
||||
public override bool HideOnUi => false;
|
||||
public override float Duration => 15f;
|
||||
public override bool AutoStart => true;
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace MiraAPI.Example.Modifiers;
|
||||
|
||||
public class HighPriorityModifier : GameModifier
|
||||
{
|
||||
public override string ModifierName => "modifier.highPriority.name";
|
||||
public override string ModifierName => "modifier.highPriority";
|
||||
|
||||
public override string GetDescription()
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace MiraAPI.Example.Options;
|
||||
|
||||
public class ExampleOptions : AbstractOptionGroup
|
||||
{
|
||||
public override string GroupName => "options.exampleOptions1.name";
|
||||
public override string GroupName => "options.exampleOptions1";
|
||||
public override Color GroupColor => Color.green;
|
||||
|
||||
[ModdedToggleOption("options.exampleOptions1.toggleOpt1")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace MiraAPI.Example.Options;
|
||||
|
||||
public class ExampleOptions2 : AbstractOptionGroup
|
||||
{
|
||||
public override string GroupName => "options.exampleOptions2.name";
|
||||
public override string GroupName => "options.exampleOptions2";
|
||||
|
||||
public override uint GroupPriority => 0; // This group will be displayed first. The default value is uint.MaxValue.
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace MiraAPI.Example.Options.Modifiers;
|
||||
|
||||
public class CaptainModifierSettings : AbstractOptionGroup<CaptainModifier>
|
||||
{
|
||||
public override string GroupName => "options.captainSettings.name";
|
||||
public override string GroupName => "options.captainSettings";
|
||||
|
||||
[ModdedNumberOption("options.captainSettings.amount", 0, 5)]
|
||||
public float Amount { get; set; } = 1;
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace MiraAPI.Example.Options.Modifiers;
|
||||
|
||||
public class FreezeModifierSettings : AbstractOptionGroup<FreezeModifier>
|
||||
{
|
||||
public override string GroupName => "options.freezeModifierSettings.name";
|
||||
public override string GroupName => "options.freezeModifierSettings";
|
||||
|
||||
[ModdedToggleOption("options.freezeModifierSettings.useColor")]
|
||||
public bool UseColor { get; set; } = true;
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace MiraAPI.Example.Options.Modifiers;
|
||||
|
||||
public class GeneralModifierOptions : AbstractOptionGroup
|
||||
{
|
||||
public override string GroupName => "options.generalModifier.name";
|
||||
public override string GroupName => "options.generalModifier";
|
||||
|
||||
public override uint GroupPriority => 0;
|
||||
|
||||
|
||||
@@ -13,11 +13,11 @@ public class FreezerRoleSettings : AbstractOptionGroup<FreezerRole>
|
||||
TmpSpriteUtils.CreateSpriteAsset(
|
||||
MiraAssets.ImpostorFile.LoadAsset(),
|
||||
"ApiExample.Role.Impostor.FreezerRole"));
|
||||
public override string GroupName => "options.freezerRoleSettings.name";
|
||||
public override string GroupName => "ApiExample.Role.Freezer";
|
||||
|
||||
[ModdedNumberOption("options.freezerRoleSettings.freezeDuration", 1, 15, 1, MiraNumberSuffixes.Seconds)]
|
||||
[ModdedNumberOption("ApiExample.Role.Freezer.Settings.FreezeDuration", 1, 15, 1, MiraNumberSuffixes.Seconds)]
|
||||
public float FreezeDuration { get; set; } = 5;
|
||||
|
||||
[ModdedNumberOption("options.freezerRoleSettings.freezeUses", 1, 5)]
|
||||
[ModdedNumberOption("ApiExample.Role.Freezer.Settings.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 => "options.teleporterOptions.name";
|
||||
public override string GroupName => "ApiExample.Role.Teleporter";
|
||||
|
||||
public ModdedNumberOption TeleportCooldown { get; set; } = new("options.teleporterOptions.teleportCooldown", 10, 5, 60, 2.5f, MiraNumberSuffixes.Seconds);
|
||||
public ModdedNumberOption TeleportCooldown { get; set; } = new("ApiExample.Role.Teleporter.Settings.TeleportCooldown", 10, 5, 60, 2.5f, MiraNumberSuffixes.Seconds);
|
||||
|
||||
[ModdedNumberOption("options.teleporterOptions.teleportDuration", 5, 25, 1, MiraNumberSuffixes.Seconds)]
|
||||
[ModdedNumberOption("ApiExample.Role.Teleporter.Settings.TeleportDuration", 5, 25, 1, MiraNumberSuffixes.Seconds)]
|
||||
public float TeleportDuration { get; set; } = 10;
|
||||
|
||||
[ModdedNumberOption("options.teleporterOptions.zoomDistance", 4, 15)]
|
||||
[ModdedNumberOption("ApiExample.Role.Teleporter.Settings.ZoomDistance", 4, 15)]
|
||||
public float ZoomDistance { get; set; } = 6;
|
||||
}
|
||||
@@ -1,69 +1,82 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<resources>
|
||||
<string name="ApiExample.Role.Teleporter">Teleporter</string>
|
||||
<string name="ApiExample.Role.Teleporter">Teleporter</string>
|
||||
<string name="ApiExample.Role.Teleporter.IntroBlurb">Zoom out and teleport across the map!</string>
|
||||
<string name="ApiExample.Role.Teleporter.MedDescription">Zoom out and teleport across the map!</string>
|
||||
<string name="ApiExample.Role.Teleporter.MedDescription">Zoom out and teleport across the map!</string>
|
||||
<string name="ApiExample.Role.Teleporter.TabDescription">Zoom out and teleport across the map!</string>
|
||||
<string name="ApiExample.Role.Teleporter.WikiDescription">The Teleporter is a Crewmate role that can move around the map using their dope-ass ability.</string>
|
||||
<string name="ApiExample.Role.Freezer">Freezer</string>
|
||||
<string name="ApiExample.Role.Freezer.TabDescription">Freeze another player for a duration of time.</string>
|
||||
<string name="ApiExample.Role.Mayor">Mayor</string>
|
||||
<string name="ApiExample.Role.Mayor.TabDescription">You get extra votes!</string>
|
||||
<string name="ApiExample.Role.Chamelon">Chamelon</string>
|
||||
<string name="ApiExample.Role.Chamelon.TabDescription">Stay invisible while not moving.</string>
|
||||
<string name="ApiExample.Role.OutcastKiller">Outcast Killer</string>
|
||||
<string name="ApiExample.Role.OutcastKiller.TabDescription">Outcast who can kill.</string>
|
||||
<string name="outcast">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">Think</string>
|
||||
<string name="button.think.thinking">Thinking...</string>
|
||||
<string name="button.freeze">Freeze</string>
|
||||
<string name="button.teleport">Teleport</string>
|
||||
<string name="button.callMeeting">Call Meeting</string>
|
||||
<string name="button.winGame">Win Game</string>
|
||||
<string name="modifier.captain">Captain</string>
|
||||
<string name="modifier.captain.TabDescription">You can call a meeting from anywhere on the map.</string>
|
||||
<string name="modifier.freezed">Freezed</string>
|
||||
<string name="modifier.highPriority">High Priority</string>
|
||||
<string name="modifier.highPriority.TabDescription">You are high priority! Idrk what this means either tbh...</string>
|
||||
<string name="options.exampleOptions1">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">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">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">Freeze</string>
|
||||
<string name="options.freezeModifierSettings.useColor">Use Color</string>
|
||||
<string name="options.generalModifier">General</string>
|
||||
<string name="options.generalModifier.someBooleanOption">Some Boolean Option</string>
|
||||
<string name="options.generalModifier.numberOption">Number Option</string>
|
||||
<string name="options.freezerRoleSettings">Custom Role</string>
|
||||
<string name="options.freezerRoleSettings.freezeDuration">Freeze Duration</string>
|
||||
<string name="options.freezerRoleSettings.freezeUses">Freeze Uses</string>
|
||||
<string name="options.teleporterOptions">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">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>
|
||||
<string name="ApiExample.Role.Freezer">Freezer</string>
|
||||
<string name="ApiExample.Role.Freezer.IntroBlurb">Get iced, nerd.</string>
|
||||
<string name="ApiExample.Role.Freezer.MedDescription">Freeze others for a duration of time.</string>
|
||||
<string name="ApiExample.Role.Freezer.TabDescription">Freeze another player for a duration of time.</string>
|
||||
<string name="ApiExample.Role.Freezer.WikiDescription">The Freezer is an Impostor role that can freeze players. Or something along those lines.</string>
|
||||
<string name="ApiExample.Role.Mayor">Mayor</string>
|
||||
<string name="ApiExample.Role.Mayor.IntroBlurb">Democracy is the best policy.</string>
|
||||
<string name="ApiExample.Role.Mayor.MedDescription">Vote out the Impostors with more votes.
|
||||
Your votes have double the power.</string>
|
||||
<string name="ApiExample.Role.Mayor.TabDescription">You get one extra vote in the meeting!</string>
|
||||
<string name="ApiExample.Role.Mayor.WikiDescription">The Mayor is a Crewmate role that gets two votes in the meeting, instead of the singular vote other Crewmates get.</string>
|
||||
<string name="ApiExample.Role.Chamelon">Chamelon</string>
|
||||
<string name="ApiExample.Role.Chamelon.IntroBlurb">Become one with the environment.</string>
|
||||
<string name="ApiExample.Role.Chamelon.MedDescription">Fade out of everyone's vision by not moving.</string>
|
||||
<string name="ApiExample.Role.Chamelon.TabDescription">Stay invisible while not moving.</string>
|
||||
<string name="ApiExample.Role.Chamelon.WikiDescription">The Chamelon is a Crewmate role that slowly becomes invisible while standing still.</string>
|
||||
<string name="ApiExample.Role.OutcastKiller">Outcast Killer</string>
|
||||
<string name="ApiExample.Role.OutcastKiller.IntroBlurb">Kill everyone else.</string>
|
||||
<string name="ApiExample.Role.OutcastKiller.MedDescription">Be the last outcast standing.
|
||||
Eliminate every other faction.</string>
|
||||
<string name="ApiExample.Role.OutcastKiller.TabDescription">Outcast who can kill.</string>
|
||||
<string name="ApiExample.Role.OutcastKiller.WikiDescription">The Outcast Killer is an Outcast role that can kill, like some sort of neutral killer...</string>
|
||||
<string name="outcast">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">Think</string>
|
||||
<string name="button.think.thinking">Thinking...</string>
|
||||
<string name="button.freeze">Freeze</string>
|
||||
<string name="button.teleport">Teleport</string>
|
||||
<string name="button.callMeeting">Call Meeting</string>
|
||||
<string name="button.winGame">Win Game</string>
|
||||
<string name="modifier.captain">Captain</string>
|
||||
<string name="modifier.captain.TabDescription">You can call a meeting from anywhere on the map.</string>
|
||||
<string name="modifier.freezed">Freezed</string>
|
||||
<string name="modifier.highPriority">High Priority</string>
|
||||
<string name="modifier.highPriority.TabDescription">You are high priority! Idrk what this means either tbh...</string>
|
||||
<string name="options.exampleOptions1">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">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">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">Freeze</string>
|
||||
<string name="options.freezeModifierSettings.useColor">Use Color</string>
|
||||
<string name="options.generalModifier">General</string>
|
||||
<string name="options.generalModifier.someBooleanOption">Some Boolean Option</string>
|
||||
<string name="options.generalModifier.numberOption">Number Option</string>
|
||||
<string name="options.freezerRoleSettings">Custom Role</string>
|
||||
<string name="ApiExample.Role.Freezer.Settings.FreezeDuration">Freeze Duration</string>
|
||||
<string name="ApiExample.Role.Freezer.Settings.FreezeUses">Freeze Uses</string>
|
||||
<string name="ApiExample.Role.Teleporter.Settings.TeleportCooldown">Teleport Cooldown</string>
|
||||
<string name="ApiExample.Role.Teleporter.Settings.TeleportDuration">Teleport Duration</string>
|
||||
<string name="ApiExample.Role.Teleporter.Settings.ZoomDistance">Zoom Distance</string>
|
||||
<string name="settings.miraExample">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>
|
||||
@@ -1,57 +1,59 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<resources>
|
||||
<string name="teleporterrole.name">传送者</string>
|
||||
<string name="teleporterrole.description">缩小视野并在地图上传送!</string>
|
||||
<string name="freezerrole.name">冰冻者</string>
|
||||
<string name="freezerrole.description">将其他玩家冰冻一段时间。</string>
|
||||
<string name="mayorrole.name">市长</string>
|
||||
<string name="ApiExample.Role.Teleporter">传送者</string>
|
||||
<string name="ApiExample.Role.Teleporter.IntroBlurb">缩小视野并在地图上传送!</string>
|
||||
<string name="ApiExample.Role.Teleporter.MedDescription">缩小视野并在地图上传送!</string>
|
||||
<string name="ApiExample.Role.Teleporter.TabDescription">缩小视野并在地图上传送!</string>
|
||||
<string name="ApiExample.Role.Freezer">冰冻者</string>
|
||||
<string name="ApiExample.Role.Freezer.TabDescription">将其他玩家冰冻一段时间。</string>
|
||||
<string name="mayorrole">市长</string>
|
||||
<string name="mayorrole.description">你拥有额外投票权!</string>
|
||||
<string name="chamelonrole.name">变色龙</string>
|
||||
<string name="chamelonrole">变色龙</string>
|
||||
<string name="chamelonrole.description">静止不动时保持隐身。</string>
|
||||
<string name="outcastKillerrole.name">流放杀手</string>
|
||||
<string name="outcastKillerrole">流放杀手</string>
|
||||
<string name="outcastKillerrole.description">可以击杀的流放者。</string>
|
||||
<string name="outcast.name">流放者</string>
|
||||
<string name="outcast">流放者</string>
|
||||
<string name="outcast.roleTitle">流放者</string>
|
||||
<string name="outcast.teamIntroDescription">你是流放者,你没有队伍。</string>
|
||||
<string name="button.think.name">思考</string>
|
||||
<string name="button.think">思考</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="button.freeze">冰冻</string>
|
||||
<string name="button.teleport">传送</string>
|
||||
<string name="button.callMeeting">召集会议</string>
|
||||
<string name="button.winGame">赢得游戏</string>
|
||||
<string name="modifier.captain">队长</string>
|
||||
<string name="modifier.captain.description">你可以在地图上任意位置召集会议。</string>
|
||||
<string name="modifier.freezed.name">已被冰冻</string>
|
||||
<string name="modifier.highPriority.name">高优先级</string>
|
||||
<string name="modifier.freezed">已被冰冻</string>
|
||||
<string name="modifier.highPriority">高优先级</string>
|
||||
<string name="modifier.highPriority.description">你是高优先级!老实说我也不太清楚这是什么意思……</string>
|
||||
<string name="options.exampleOptions1.name">示例选项组 1</string>
|
||||
<string name="options.exampleOptions1">示例选项组 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">示例选项组 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">队长设置</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">冰冻</string>
|
||||
<string name="options.freezeModifierSettings.useColor">使用颜色</string>
|
||||
<string name="options.generalModifier.name">通用</string>
|
||||
<string name="options.generalModifier">通用</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="options.freezerRoleSettings">自定义职业</string>
|
||||
<string name="ApiExample.Role.Freezer.Settings.FreezeDuration">冰冻时长</string>
|
||||
<string name="ApiExample.Role.Freezer.Settings.FreezeUses">冰冻次数</string>
|
||||
<string name="ApiExample.Role.Teleporter.Settings">传送者</string>
|
||||
<string name="ApiExample.Role.Teleporter.Settings.TeleportCooldown">传送冷却</string>
|
||||
<string name="ApiExample.Role.Teleporter.Settings.TeleportDuration">传送持续时间</string>
|
||||
<string name="ApiExample.Role.Teleporter.Settings.ZoomDistance">缩放距离</string>
|
||||
<string name="settings.miraExample">Mira 示例插件</string>
|
||||
<string name="settings.miraExample.exampleBool">示例布尔</string>
|
||||
<string name="settings.miraExample.exampleBool2">示例布尔 2</string>
|
||||
<string name="settings.miraExample.slider">滑块</string>
|
||||
|
||||
@@ -19,7 +19,7 @@ public class NeutralKillerRole : ImpostorRole, ICustomRole
|
||||
CanUseVent = true,
|
||||
};
|
||||
|
||||
public RoleOptionsGroup RoleOptionsGroup { get; } = new("outcast.name", Color.gray);
|
||||
public RoleOptionsGroup RoleOptionsGroup { get; } = new("outcast", Color.gray);
|
||||
|
||||
[HideFromIl2Cpp]
|
||||
public TeamIntroConfiguration? IntroConfiguration { get; } = new(
|
||||
|
||||
@@ -33,7 +33,7 @@ public abstract class AbstractGameMode : IOptionable
|
||||
public abstract string Description { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the game mode description.
|
||||
/// Gets the game mode color to display on the lobby pane.
|
||||
/// </summary>
|
||||
public virtual Color Color { get; } = Color.white;
|
||||
|
||||
@@ -43,14 +43,14 @@ public abstract class AbstractGameMode : IOptionable
|
||||
public virtual LoadableAsset<Sprite>? Icon => null;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the icon of the gamemode for use on the options pop-up.
|
||||
/// Gets or sets the icon of the gamemode for use on the options pop-up.
|
||||
/// </summary>
|
||||
public TMP_SpriteAsset TmpIcon { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the colored game mode name, using the color and name properties.
|
||||
/// </summary>
|
||||
public string ColoredName => $"<color=#{this.Color.ToHtmlStringRGBA()}>{MiraLocaleManager.Get(Name)}</color>";
|
||||
public string ColoredName => $"<color=#{Color.ToHtmlStringRGBA()}>{MiraLocaleManager.Get(Name)}</color>";
|
||||
|
||||
/// <summary>
|
||||
/// Gets the game mode id.
|
||||
|
||||
@@ -53,13 +53,13 @@ public static class GameModeOption
|
||||
internal static readonly StringNames CustomName = MiraLocaleManager.GetOrCreateLocaleString("Custom");
|
||||
internal static readonly Dictionary<uint, StringNames> Values = new()
|
||||
{
|
||||
[0] = MiraLocaleManager.GetOrCreateLocaleString("Classic"),
|
||||
[0] = MiraLocaleManager.GetOrCreateLocaleString("gamemode.classic"),
|
||||
};
|
||||
|
||||
internal static void AddOption(AbstractGameMode mode)
|
||||
{
|
||||
if (!Values.ContainsKey(mode.ID))
|
||||
Values.Add(mode.ID, MiraLocaleManager.GetOrCreateLocaleString(mode + ".colored"));
|
||||
Values.Add(mode.ID, MiraLocaleManager.GetOrCreateLocaleString(mode.Name));
|
||||
}
|
||||
/*[HarmonyPatch(typeof(GameOptionsMenu), nameof(GameOptionsMenu.CreateSettings))]
|
||||
[HarmonyPostfix]
|
||||
|
||||
+20
-20
@@ -17,7 +17,7 @@ namespace MiraAPI;
|
||||
public class MiraApiSettings(ConfigFile config) : LocalSettingsTab(config)
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string TabName => "miraApi.name".Translate();
|
||||
public override string TabName => "miraApi";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override LocalSettingTabAppearance TabAppearance => new()
|
||||
@@ -205,58 +205,58 @@ public class MiraApiSettings(ConfigFile config) : LocalSettingsTab(config)
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the modifiers hud should be on the left side of the screen (under roles/task tab). Recommended for streamers.
|
||||
/// </summary>
|
||||
[LocalToggleSetting]
|
||||
public ConfigEntry<bool> ModifiersHudLeftSide { get; private set; } = config.Bind("Visuals/UI", "Show Modifiers HUD on Left Side", false);
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether to show keybinds on buttons.
|
||||
/// </summary>
|
||||
[LocalToggleSetting]
|
||||
public ConfigEntry<bool> ShowKeybinds { get; private set; } = config.Bind("Visuals/UI", "Show Keybinds on Buttons", true);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the scale of the ability buttons.
|
||||
/// </summary>
|
||||
[LocalSliderSetting(min: 0.5f, max: 1.5f, suffixType: MiraNumberSuffixes.Multiplier, formatString: "0.00", displayValue: true)]
|
||||
public ConfigEntry<float> ButtonUIFactorSlider { get; private set; } =
|
||||
config.Bind("Visuals/UI", "Button Scale Factor", 0.75f);
|
||||
config.Bind("miraApi.visualsUi", "miraApi.buttonScaleFactor", 0.75f);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the scale of the UI buttons.
|
||||
/// </summary>
|
||||
[LocalSliderSetting(min: 0.3f, max: 2f, suffixType: MiraNumberSuffixes.Multiplier, formatString: "0.00", displayValue: true)]
|
||||
public ConfigEntry<float> TopRightButtonsFactorSlider { get; private set; } =
|
||||
config.Bind("Visuals/UI", "Top-Right UI Scale Factor", 1f);
|
||||
config.Bind("miraApi.visualsUi", "miraApi.topRightButtonScaleFactor", 1f);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fps specified by the player.
|
||||
/// </summary>
|
||||
[LocalSliderSetting(min: 60f, max: 240f, suffixType: MiraNumberSuffixes.None, formatString: "0", displayValue: true, roundValue: true)]
|
||||
public ConfigEntry<float> SetFpsSlider { get; private set; } =
|
||||
config.Bind("Visuals/UI", "Max FPS", 120f);
|
||||
config.Bind("miraApi.visualsUi", "Max FPS", 120f);
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the modifiers hud should be on the left side of the screen (under roles/task tab). Recommended for streamers.
|
||||
/// </summary>
|
||||
[LocalToggleSetting]
|
||||
public ConfigEntry<bool> ModifiersHudLeftSide { get; private set; } = config.Bind("miraApi.visualsUi", "miraApi.showModifiersHudOnLeftSide", false);
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether to show keybinds on buttons.
|
||||
/// </summary>
|
||||
[LocalToggleSetting]
|
||||
public ConfigEntry<bool> ShowKeybinds { get; private set; } = config.Bind("miraApi.visualsUi", "miraApi.showKeybindsOnButtons", true);
|
||||
|
||||
[LocalToggleSetting]
|
||||
public ConfigEntry<bool> WikiOnBottomRow { get; private set; } =
|
||||
config.Bind("Visuals/UI", "Display Wiki on Bottom Row", true);
|
||||
config.Bind("miraApi.visualsUi", "miraApi.wikiOnBottomRow", true);
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether to apply cosmetic changes to the TaskAdder.
|
||||
/// </summary>
|
||||
[LocalToggleSetting]
|
||||
public ConfigEntry<bool> PrettyTaskAdder { get; private set; } = config.Bind("Freeplay", "Pretty Task Laptop", true);
|
||||
public ConfigEntry<bool> PrettyTaskAdder { get; private set; } = config.Bind("miraApi.freeplay", "miraApi.prettyTaskLaptop", true);
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether to show the red flash from sabotages.
|
||||
/// </summary>
|
||||
[LocalToggleSetting]
|
||||
public ConfigEntry<bool> EnableSabotageFlashes { get; private set; } = config.Bind("Accessibility", "Enable Sabotage Flashes", true);
|
||||
public ConfigEntry<bool> EnableSabotageFlashes { get; private set; } = config.Bind("miraApi.accessibility", "miraApi.enableSabotageFlashes", true);
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether to enable the sabotage sound effects or not.
|
||||
/// </summary>
|
||||
[LocalToggleSetting]
|
||||
public ConfigEntry<bool> EnableSabotageBlares { get; private set; } = config.Bind("Accessibility", "Enable Sabotage Blare", true);
|
||||
public ConfigEntry<bool> EnableSabotageBlares { get; private set; } = config.Bind("miraApi.accessibility", "miraApi.enableSabotageBlare", true);
|
||||
}
|
||||
@@ -2,6 +2,7 @@ using System.Collections;
|
||||
using HarmonyLib;
|
||||
using Il2CppSystem;
|
||||
using MiraAPI.GameModes;
|
||||
using MiraAPI.Translation;
|
||||
using Reactor.Utilities;
|
||||
using Reactor.Utilities.Extensions;
|
||||
using TMPro;
|
||||
@@ -49,7 +50,7 @@ internal static class HudPatches
|
||||
gmText.SetActive(false);
|
||||
modelText.SetActive(false);
|
||||
_text = gmTextClone.GetComponent<TextMeshPro>();
|
||||
_text.text = CustomGameModeManager.ActiveMode != null ? $"<color=#{CustomGameModeManager.ActiveMode.Color.ToHtmlStringRGBA()}>{CustomGameModeManager.ActiveMode.Name}</color>" : "Classic";
|
||||
_text.text = CustomGameModeManager.ActiveMode != null ? CustomGameModeManager.ActiveMode.ColoredName : MiraLocaleManager.Get("gamemode.classic");
|
||||
CustomGameModeManager.ActiveMode?.HudStart(instance);
|
||||
}
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ public static class LobbyViewPanePatches
|
||||
var cgm = GetCustomGamemode();
|
||||
ModifiersTabButton?.gameObject.SetActive(false);
|
||||
menu.rolesTabButton.gameObject.SetActive(cgm is null or { ShowNormalRoleSettings: true });
|
||||
menu.gameModeText.text = cgm is null ? "Main" : cgm.ColoredName;
|
||||
menu.gameModeText.text = cgm is null ? MiraLocaleManager.Get("gamemode.classic") : cgm.ColoredName;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<resources>
|
||||
<string name="miraApi.name">Mira API</string>
|
||||
<string name="miraApi">Mira API</string>
|
||||
<string name="miraApi.visualsUi">Visuals/UI</string>
|
||||
<string name="miraApi.freeplay">Freeplay</string>
|
||||
<string name="miraApi.accessibility">Accessibility</string>
|
||||
@@ -8,7 +8,9 @@
|
||||
<string name="miraApi.showModifiersHudOnLeftSide">Show Modifiers HUD on Left Side</string>
|
||||
<string name="miraApi.showKeybindsOnButtons">Show Keybinds on Buttons</string>
|
||||
<string name="miraApi.buttonScaleFactor">Button Scale Factor</string>
|
||||
<string name="miraApi.topRightButtonScaleFactor">Top-Right UI Scale Factor</string>
|
||||
<string name="miraApi.maxFps">Max FPS</string>
|
||||
<string name="miraApi.wikiOnBottomRow">Display Wiki on Bottom Row</string>
|
||||
<string name="miraApi.prettyTaskLaptop">Pretty Task Laptop</string>
|
||||
<string name="miraApi.enableSabotageFlashes">Enable Sabotage Flashes</string>
|
||||
<string name="miraApi.enableSabotageBlare">Enable Sabotage Blare</string>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<resources>
|
||||
<string name="miraApi.name">Mira API</string>
|
||||
<string name="miraApi">Mira API</string>
|
||||
<string name="miraApi.visualsUi">界面/视觉</string>
|
||||
<string name="miraApi.freeplay">自由模式</string>
|
||||
<string name="miraApi.accessibility">无障碍</string>
|
||||
@@ -17,7 +17,7 @@
|
||||
<string name="miraApi.customCategory2">自定义类别 2</string>
|
||||
<string name="miraApi.modifierMenuDescription">在此配置附加职业及其设置!</string>
|
||||
<string name="miraApi.customOptionMenuDescription">为此模组应用游戏设置!</string>
|
||||
<string name="gamemode.default.name">默认</string>
|
||||
<string name="gamemode.default">默认</string>
|
||||
<string name="gamemode.default.description">默认原版游戏模式</string>
|
||||
<string name="gamesetting.global.clicktoclose">点击关闭</string>
|
||||
<string name="gamesetting.preset.hint">为本游戏选择或创建一个预设</string>
|
||||
|
||||
Reference in new issue
Block a user