Update ChemMasterSystem.cs

This commit is contained in:
Valtos
2025-07-04 16:08:00 +03:00
committed by GitHub
parent 2d10f577e1
commit 7c67bcc8da

View File

@@ -42,6 +42,8 @@ namespace Content.Server.Chemistry.EntitySystems
[ValidatePrototypeId<EntityPrototype>] [ValidatePrototypeId<EntityPrototype>]
private const string PillPrototypeId = "Pill"; private const string PillPrototypeId = "Pill";
private const int MaxPillsPerRequest = 50;
public override void Initialize() public override void Initialize()
{ {
base.Initialize(); base.Initialize();
@@ -190,6 +192,12 @@ namespace Content.Server.Chemistry.EntitySystems
if (message.Number == 0 || !_storageSystem.HasSpace((container, storage))) if (message.Number == 0 || !_storageSystem.HasSpace((container, storage)))
return; return;
if (message.Number > MaxPillsPerRequest)
{
_popupSystem.PopupCursor("ДИНАХУЙ", user);
return;
}
// Ensure the amount is valid. // Ensure the amount is valid.
if (message.Dosage == 0 || message.Dosage > chemMaster.Comp.PillDosageLimit) if (message.Dosage == 0 || message.Dosage > chemMaster.Comp.PillDosageLimit)
return; return;