Traveller/scripts/SloganProvider.cs

26 lines
623 B
C#
Raw Normal View History

using System.Collections.Generic;
using ColdMint.scripts.utils;
using Godot;
2024-04-28 13:55:19 +00:00
namespace ColdMint.scripts;
/// <summary>
/// <para>SloganProvider</para>
/// <para>标语提供器</para>
/// </summary>
public static class SloganProvider
{
private const int MaxSloganIndex = 5;
2024-04-28 13:55:19 +00:00
/// <summary>
/// <para>Swipe the machine to get a slogan</para>
/// <para>刷机获取一个标语</para>
/// </summary>
/// <returns></returns>
public static string? GetSlogan()
2024-04-28 13:55:19 +00:00
{
var index = GD.Randi() % MaxSloganIndex + 1;
return TranslationServerUtils.Translate("slogan_" + index);
2024-04-28 13:55:19 +00:00
}
}