@@ -107,7 +107,12 @@ public sealed class AmeControllerSystem : EntitySystem
|
||||
var powerOutput = group.InjectFuel(availableInject, out var overloading);
|
||||
if (TryComp<PowerSupplierComponent>(uid, out var powerOutlet))
|
||||
powerOutlet.MaxSupply = powerOutput;
|
||||
|
||||
fuelContainer.FuelAmount -= availableInject;
|
||||
|
||||
// Dirty for the sake of the AME fuel examine not mispredicting
|
||||
Dirty(controller.FuelSlot.Item.Value, fuelContainer);
|
||||
|
||||
// only play audio if we actually had an injection
|
||||
if (availableInject > 0)
|
||||
_audioSystem.PlayPvs(controller.InjectSound, uid, AudioParams.Default.WithVolume(overloading ? 10f : 0f));
|
||||
|
||||
@@ -8,12 +8,12 @@ public sealed partial class AmeFuelContainerComponent : Component
|
||||
/// <summary>
|
||||
/// The amount of fuel in the container.
|
||||
/// </summary>
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
[DataField, AutoNetworkedField]
|
||||
public int FuelAmount = 500;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum fuel capacity of the container.
|
||||
/// </summary>
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
[DataField, AutoNetworkedField]
|
||||
public int FuelCapacity = 500;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user