Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
aba216ebbb
3 changed files with 13 additions and 1 deletions
|
|
@ -46,10 +46,16 @@ namespace Content.Server.RatKing
|
|||
if (!TryComp<HungerComponent>(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;
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
rat-king-too-hungry = У вас превышено максимальное количество подданных: { $amount }
|
||||
Loading…
Add table
Reference in a new issue