Improve equip fail messages.
Message when trying to equip regular items to slots. Mention ID slot specifically.
This commit is contained in:
@@ -34,7 +34,9 @@ namespace Content.Server.GameObjects
|
|||||||
// Can't wear stuff in ID card or pockets unless you have a uniform.
|
// Can't wear stuff in ID card or pockets unless you have a uniform.
|
||||||
if (_inventory.GetSlotItem(Slots.INNERCLOTHING) == null)
|
if (_inventory.GetSlotItem(Slots.INNERCLOTHING) == null)
|
||||||
{
|
{
|
||||||
reason = Loc.GetString("You need a uniform to store something in your pockets!");
|
reason = Loc.GetString(slotMask == SlotFlags.IDCARD
|
||||||
|
? "You need a uniform to store something in your ID slot!"
|
||||||
|
: "You need a uniform to store something in your pockets!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks.Dataflow;
|
using System.Threading.Tasks.Dataflow;
|
||||||
@@ -158,6 +158,11 @@ namespace Content.Server.GameObjects
|
|||||||
reason = controllerReason ?? reason;
|
reason = controllerReason ?? reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!pass && reason == null)
|
||||||
|
{
|
||||||
|
reason = Loc.GetString("You can't equip this!");
|
||||||
|
}
|
||||||
|
|
||||||
return pass && SlotContainers[slot].CanInsert(item.Owner);
|
return pass && SlotContainers[slot].CanInsert(item.Owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user