Table of Contents

Class PlayerContributionTracker

Namespace
Uncreated.Warfare.Util
Assembly
Uncreated.Warfare.dll
public class PlayerContributionTracker : IEnumerable<PlayerWork>, IEnumerable
Inheritance
PlayerContributionTracker
Implements
Inherited Members
Extension Methods

Constructors

PlayerContributionTracker()

public PlayerContributionTracker()

PlayerContributionTracker(int)

public PlayerContributionTracker(int capacity)

Parameters

capacity int

Properties

ContributorCount

public int ContributorCount { get; }

Property Value

int

Contributors

public PlayerContributionTracker.ContributorEnumerator Contributors { get; }

Property Value

PlayerContributionTracker.ContributorEnumerator

TotalWorkDone

public float TotalWorkDone { get; }

Property Value

float

Methods

Clear()

public void Clear()

GetContribution(CSteamID, DateTime, out float)

public float GetContribution(CSteamID player, DateTime after, out float total)

Parameters

player CSteamID
after DateTime
total float

Returns

float

A PlayerWork indicating how much work the player player has contributed.

GetContribution(CSteamID, out float)

public float GetContribution(CSteamID player, out float total)

Parameters

player CSteamID
total float

Returns

float

A PlayerWork indicating how much work the player player has contributed.

GetContributionPercentage(CSteamID)

public float GetContributionPercentage(CSteamID player)

Parameters

player CSteamID

Returns

float

The percentage of the work player has done (from 0 to 1).

GetContributionPercentage(CSteamID, DateTime)

public float GetContributionPercentage(CSteamID player, DateTime after)

Parameters

player CSteamID
after DateTime

Returns

float

GetEnumerator()

public PlayerContributionTracker.PlayerWorkEnumerator GetEnumerator()

Returns

PlayerContributionTracker.PlayerWorkEnumerator

RecordWork(CSteamID, float, DateTime?)

Increment a player's work points by workPoints.

public void RecordWork(CSteamID player, float workPoints, DateTime? timePerformed = null)

Parameters

player CSteamID
workPoints float
timePerformed DateTime?