Show / Hide Table of Contents

Class AggregateUserAmountManager

Aggregates given amounts and gets ticked using CivicsPlugin through OnUserAggregateAmountDue(User, Single)

Inheritance
System.Object
AggregateUserAmountManager
Namespace: Eco.Gameplay.Civics.Economy
Assembly: Eco.Gameplay.dll
Syntax
public class AggregateUserAmountManager : Singleton<AggregateUserAmountManager>
Remarks

This is meant to process transfers in bulk instead of using AggregatedNotifications to avoid extra processing that isn't meant to be done for notifications.

Examples

Used for WorkParty Pay as you go feature where fraction payments that can get aggregated over Eco.Gameplay.Civics.Economy.AggregatedAmount.Delay time.

Constructors

AggregateUserAmountManager()

Declaration
public AggregateUserAmountManager()

Properties

OnChanged

Declaration
public ThreadSafeAction OnChanged { get; }
Property Value
Type Description
ThreadSafeAction

Methods

AddOrUpdateAggregatedAmount(IHasUserAggregatedAmount, User, Single)

Adds a delayed amount by Eco.Gameplay.Civics.Economy.AggregatedAmount.Delay that should aggregate if there is a value with the same handles already delayed.

Declaration
public void AddOrUpdateAggregatedAmount(IHasUserAggregatedAmount aggregatedAmountHandler, User user, float amountDelta)
Parameters
Type Name Description
IHasUserAggregatedAmount aggregatedAmountHandler

The aggregated amount Handler that should be resposible for handling the aggregated value.

User user

The target user that the amount should go to.

System.Single amountDelta

The difference in aggregated amount that should applied for the given user, for example in WorkParites the payment is calculated with Payment, in which the weight change (aggregated amount) is given and then payment is calculated and paid.

ForceAggregatingAmountsForHandler(IHasUserAggregatedAmount)

Forces the remaining aggregate amounts for the given amount handler.

Declaration
public void ForceAggregatingAmountsForHandler(IHasUserAggregatedAmount aggregatedAmountHandler)
Parameters
Type Name Description
IHasUserAggregatedAmount aggregatedAmountHandler

Initialize()

Declaration
public void Initialize()

Tick()

When ticked checks if there are aggregate amounts due and pays it.

Declaration
public void Tick()

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾