19 lines
606 B
C#
19 lines
606 B
C#
public class ItemActionUseMedRebirth : ItemActionEat
|
|
{
|
|
public override void ExecuteAction(ItemActionData _actionData, bool _bReleased)
|
|
{
|
|
EntityAlive holdingEntity = _actionData.invData.holdingEntity;
|
|
|
|
float healingAmount = holdingEntity.Buffs.GetCustomVar("medicalRegHealthAmount");
|
|
|
|
if (healingAmount <= 10)
|
|
{
|
|
base.ExecuteAction(_actionData, _bReleased);
|
|
}
|
|
else
|
|
{
|
|
GameManager.ShowTooltip(holdingEntity as EntityPlayerLocal, Localization.Get("ttNotDoneHealing"), string.Empty, "ui_denied", null);
|
|
}
|
|
}
|
|
}
|