Cloning Rework (#8972)

Co-authored-by: fishfish458 <fishfish458>
This commit is contained in:
Rane
2022-08-04 00:05:17 -04:00
committed by GitHub
parent 37f9e825ea
commit 2f4849eae1
41 changed files with 928 additions and 1227 deletions

View File

@@ -83,5 +83,18 @@ namespace Content.Server.Power.EntitySystems
if (TryComp(receiver.Owner, out AppearanceComponent? appearance))
appearance.SetData(PowerDeviceVisuals.Powered, receiver.Powered);
}
/// <summary>
/// If this takes power, it returns whether it has power.
/// Otherwise, it returns 'true' because if something doesn't take power
/// it's effectively always powered.
/// </summary>
public bool IsPowered(EntityUid uid, ApcPowerReceiverComponent? receiver = null)
{
if (!Resolve(uid, ref receiver, false))
return true;
return receiver.Powered;
}
}
}