parent
06476d766d
commit
9dd0855dd0
2 changed files with 7 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue