Rejunevate now satiates hunger and thirst plus code quality (#456)
* Change Rejunevate to satiate hunger and thirst whenever applicable * More progress * One more before rebase * Shit * Bop obsolete using * Verb will not show on non-applicable objects
This commit is contained in:
committed by
Pieter-Jan Briers
parent
421847e9d3
commit
17b31c417b
@@ -1,4 +1,4 @@
|
||||
using Content.Server.GameObjects;
|
||||
using Content.Server.GlobalVerbs;
|
||||
using Robust.Server.Interfaces.Console;
|
||||
using Robust.Server.Interfaces.Player;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -39,13 +39,7 @@ namespace Content.Server.Administration
|
||||
shell.SendText(player, localizationManager.GetString("There's no entity attached to the user."));
|
||||
return;
|
||||
}
|
||||
if (!player.AttachedEntity.TryGetComponent(out DamageableComponent damage))
|
||||
{
|
||||
shell.SendText(player, localizationManager.GetString("The user's entity does not have a DamageableComponent."));
|
||||
return;
|
||||
}
|
||||
damage.HealAllDamage();
|
||||
return;
|
||||
RejuvenateVerb.PerformRejuvenate(player.AttachedEntity);
|
||||
}
|
||||
|
||||
var entityManager = IoCManager.Resolve<IEntityManager>();
|
||||
@@ -56,12 +50,7 @@ namespace Content.Server.Administration
|
||||
shell.SendText(player, localizationManager.GetString("Could not find entity {0}", arg));
|
||||
continue;
|
||||
}
|
||||
if (!entity.TryGetComponent(out DamageableComponent damage))
|
||||
{
|
||||
shell.SendText(player, localizationManager.GetString("Entity {0} does not have a DamageableComponent.", arg));
|
||||
continue;
|
||||
}
|
||||
damage.HealAllDamage();
|
||||
RejuvenateVerb.PerformRejuvenate(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user