Beds, Medical Beds, Stasis Beds (#6695)

This commit is contained in:
Rane
2022-04-15 18:53:52 -04:00
committed by GitHub
parent 3383350c03
commit 5376aed6ea
36 changed files with 534 additions and 31 deletions

View File

@@ -1,5 +1,6 @@
using Content.Shared.Disease;
using Content.Server.Buckle.Components;
using Content.Server.Bed.Components;
namespace Content.Server.Disease.Cures
{
@@ -7,7 +8,6 @@ namespace Content.Server.Disease.Cures
/// Cures the disease after a certain amount of time
/// strapped.
/// </summary>
/// TODO: Revisit after bed pr merged
public sealed class DiseaseBedrestCure : DiseaseCure
{
[ViewVariables(VVAccess.ReadWrite)]
@@ -18,7 +18,8 @@ namespace Content.Server.Disease.Cures
public override bool Cure(DiseaseEffectArgs args)
{
if (!args.EntityManager.TryGetComponent<BuckleComponent>(args.DiseasedEntity, out var buckle))
if (!args.EntityManager.TryGetComponent<BuckleComponent>(args.DiseasedEntity, out var buckle) ||
!args.EntityManager.HasComponent<HealOnBuckleComponent>(buckle.BuckledTo?.Owner))
return false;
if (buckle.Buckled)
Ticker++;