diff --git a/Content.Server/RatKing/RatKingSystem.cs b/Content.Server/RatKing/RatKingSystem.cs index 4b82dba335..c0adaab7aa 100644 --- a/Content.Server/RatKing/RatKingSystem.cs +++ b/Content.Server/RatKing/RatKingSystem.cs @@ -46,10 +46,16 @@ namespace Content.Server.RatKing if (!TryComp(uid, out var hunger)) return; + if (component.Servants.Count >= component.MaxArmyCount) + { + _popup.PopupEntity(Loc.GetString("rat-king-max-army"), uid, uid); + return; + } + //make sure the hunger doesn't go into the negatives if (hunger.CurrentHunger < component.HungerPerArmyUse) { - _popup.PopupEntity(Loc.GetString("rat-king-too-hungry"), uid, uid); + _popup.PopupEntity(Loc.GetString("rat-king-too-hungry", ("amount", component.MaxArmyCount)), uid, uid); return; } args.Handled = true; diff --git a/Content.Shared/RatKing/RatKingComponent.cs b/Content.Shared/RatKing/RatKingComponent.cs index 712d4ae3a1..e0b180b4aa 100644 --- a/Content.Shared/RatKing/RatKingComponent.cs +++ b/Content.Shared/RatKing/RatKingComponent.cs @@ -99,6 +99,11 @@ public sealed partial class RatKingComponent : Component { RatKingOrderType.CheeseEm, "RatKingCommandCheeseEm" }, { RatKingOrderType.Loose, "RatKingCommandLoose" } }; + + // Sunrise-start + [DataField] + public int MaxArmyCount = 12; + // Sunrise-end } [Serializable, NetSerializable] diff --git a/Resources/Locale/ru-RU/_strings/_sunrise/animals/rat-king/rat-king.ftl b/Resources/Locale/ru-RU/_strings/_sunrise/animals/rat-king/rat-king.ftl new file mode 100644 index 0000000000..e868bc546e --- /dev/null +++ b/Resources/Locale/ru-RU/_strings/_sunrise/animals/rat-king/rat-king.ftl @@ -0,0 +1 @@ +rat-king-too-hungry = У вас превышено максимальное количество подданных: { $amount }