Update ChemMasterSystem.cs
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user