Merge branch 'master-upstream' into expl_int_analyzer

# Conflicts:
#	Content.Server/GameObjects/Components/Body/Part/BodyPartComponent.cs
#	Content.Server/GameObjects/Components/Botany/PlantHolderComponent.cs
#	Content.Server/GameObjects/Components/Chemistry/PillComponent.cs
#	Content.Server/GameObjects/Components/Interactable/TilePryingComponent.cs
#	Content.Server/GameObjects/Components/Items/FloorTileItemComponent.cs
#	Content.Server/GameObjects/Components/Items/RCD/RCDAmmoComponent.cs
#	Content.Server/GameObjects/Components/Items/RCD/RCDComponent.cs
#	Content.Server/GameObjects/Components/Medical/HealingComponent.cs
#	Content.Server/GameObjects/Components/Power/WirePlacerComponent.cs
#	Content.Shared/Chemistry/Solution.cs
This commit is contained in:
Paul
2021-02-04 17:50:28 +01:00
499 changed files with 6357 additions and 8689 deletions

View File

@@ -26,39 +26,41 @@ namespace Content.Server.GameObjects.Components.Medical
serializer.DataField(this, h => h.Heal, "heal", new Dictionary<DamageType, int>());
}
async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
async Task<bool> IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
{
if (eventArgs.Target == null)
{
return;
return false;
}
if (!eventArgs.Target.TryGetComponent(out IDamageableComponent damageable))
{
return;
return true;
}
if (!ActionBlockerSystem.CanInteract(eventArgs.User))
{
return;
return true;
}
if (eventArgs.User != eventArgs.Target &&
!eventArgs.InRangeUnobstructed(ignoreInsideBlocker: true, popup: true))
{
return;
return true;
}
if (Owner.TryGetComponent(out StackComponent stack) &&
!stack.Use(1))
{
return;
return true;
}
foreach (var (type, amount) in Heal)
{
damageable.ChangeDamage(type, -amount, true);
}
return true;
}
}
}