Skip to main content

PlayerReportSummaryPanel

A class in Root.Township, Alta.Meta.UI.ServerManagement.

Client: server management panel that sums up all reports against one player: total count, counts per reason, reporters, latest date and any ban.

Constructors​

MemberWhat it is
PlayerReportSummaryPanel()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

8 private and internal fields
MemberWhat it is
private TextRenderer actionTakenAtTextDate of the latest ban.
private TextRenderer actionTakenByTextWho made the latest ban.
private TextRenderer actionTakenTextShows "Action taken: Banned" if any report was acted on.
private TextRenderer reasonTextOne line per report reason with its count, most common first.
private TextRenderer reportedUserTextReported player's name and total report count.
private TextRenderer reporterTextLatest reporter's name and how many others reported.
private TextRenderer serverTextThe server the reports came from.
private TextRenderer timeTextDate of the latest report and roughly how long ago it was.

Methods​

MemberWhat it is
void SetupForReport(PlayerReportSummary playerSummary)Fills the texts from a report summary: total and per-reason counts, latest reporter plus how many others, latest report date and the latest ban if any.
2 private and internal methods
MemberWhat it is
private void OnEnable()Clears the report texts when the panel is shown.
private static string Pluralize(string value, int count, int ifOver = 1)Adds an s to a word when the count is over ifOver (default 1).

Used in​

Members of other types that take, return or hold a PlayerReportSummaryPanel: