Delivery random multipliers (#36918)

* init

* review

* init

* teehee
This commit is contained in:
ScarKy0
2025-04-26 23:42:27 +02:00
committed by GitHub
parent 8f35bc76c2
commit f0472b2173
6 changed files with 98 additions and 20 deletions

View File

@@ -0,0 +1,32 @@
using Robust.Shared.GameStates;
namespace Content.Shared.Delivery;
/// <summary>
/// Component given to deliveries.
/// Applies a random multiplier to the delivery on init.
/// Added additively to the total multiplier.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(DeliveryModifierSystem))]
public sealed partial class DeliveryRandomMultiplierComponent : Component
{
/// <summary>
/// The highest the random multiplier can go.
/// </summary>
[DataField]
public float MaxMultiplierOffset = 0.2f;
/// <summary>
/// The lowest the random multiplier can go.
/// </summary>
[DataField]
public float MinMultiplierOffset = -0.2f;
/// <summary>
/// The current multiplier this component provides.
/// Gets randomized between MaxMultiplierOffset and MinMultiplierOffset on MapInit.
/// </summary>
[DataField, AutoNetworkedField]
public float CurrentMultiplierOffset;
}