Station Anchor (#26098)

* Work on abstracting out chargeup functionality/ui from grav gen

* Work on station anchor

* Finish implementing station anchors

* uhh yeah

* ok.

* fix tests

* whoops

* Get the last extraneous yaml fail

* PJB review

* beast mode... ACTIVATE!

---------

Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>
Co-authored-by: EmoGarbage404 <retron404@gmail.com>
This commit is contained in:
Julian Giebel
2024-08-31 16:40:28 +02:00
committed by GitHub
parent 8dbaca33e6
commit 417d3a87a2
30 changed files with 944 additions and 541 deletions

View File

@@ -8,42 +8,13 @@ namespace Content.Server.Gravity
[Access(typeof(GravityGeneratorSystem))]
public sealed partial class GravityGeneratorComponent : SharedGravityGeneratorComponent
{
// 1% charge per second.
[ViewVariables(VVAccess.ReadWrite)] [DataField("chargeRate")] public float ChargeRate { get; set; } = 0.01f;
// The gravity generator has two power values.
// Idle power is assumed to be the power needed to run the control systems and interface.
[DataField("idlePower")] public float IdlePowerUse { get; set; }
// Active power is the power needed to keep the gravity field stable.
[DataField("activePower")] public float ActivePowerUse { get; set; }
[DataField("lightRadiusMin")] public float LightRadiusMin { get; set; }
[DataField("lightRadiusMax")] public float LightRadiusMax { get; set; }
/// <summary>
/// Is the power switch on?
/// </summary>
[DataField("switchedOn")]
public bool SwitchedOn { get; set; } = true;
/// <summary>
/// Is the gravity generator intact?
/// </summary>
[DataField("intact")]
public bool Intact { get; set; } = true;
[DataField("maxCharge")]
public float MaxCharge { get; set; } = 1;
// 0 -> 1
[ViewVariables(VVAccess.ReadWrite)] [DataField("charge")] public float Charge { get; set; } = 1;
/// <summary>
/// Is the gravity generator currently "producing" gravity?
/// </summary>
[ViewVariables]
public bool GravityActive { get; set; } = false;
// Do we need a UI update even if the charge doesn't change? Used by power button.
[ViewVariables] public bool NeedUIUpdate { get; set; }
}
}