Add error popup message on equip failure (#955)

This commit is contained in:
Hugal31
2020-05-23 17:27:57 +02:00
committed by GitHub
parent 1ad9a10050
commit 6c2ad53b68
4 changed files with 69 additions and 9 deletions

View File

@@ -14,7 +14,14 @@ namespace Content.Server.GameObjects
/// <param name="slot">The slot to be equipped into.</param>
/// <param name="entity">The entity to equip.</param>
/// <param name="flagsCheck">Whether the entity passes default slot masks & flags checks.</param>
/// <param name="reason">The translated reason why the item cannot be equiped, if this function returns false. Can be null.</param>
/// <returns>True if the entity can be equipped, false otherwise</returns>
bool CanEquip(Slots slot, IEntity entity, bool flagsCheck) => flagsCheck;
bool CanEquip(Slots slot, IEntity entity, bool flagsCheck, out string reason)
{
reason = null;
return flagsCheck;
}
bool CanEquip(Slots slot, IEntity entity, bool flagsCheck) => CanEquip(slot, entity, flagsCheck, out var _);
}
}