Skip to main content

DeathReportDataService

Realm-agnostic core of death reporting. Owns the per-subject report observers, the DeathReportDataService.NewDeathReport signal and the recent-report queue that DeathReportService and DeathReportServiceClient both expose. Each realm's service feeds it reports -- the server from DeathTrackedHumanoid, the client from remoting -- and aliases its observers.

Properties​

NewDeathReport​

DeathReportDataService.NewDeathReport: Signal<DeathReport>

Fires with every [DeathReport] handled in this realm

Functions​

Init​

DeathReportDataService.Init(
serviceBag: ServiceBag.ServiceBag
) → ()

Initializes the service. Should be done via ServiceBag.

ObservePlayerKillerReports​

DeathReportDataService.ObservePlayerKillerReports() → Observable.Observable<DeathReportUtils.DeathReport>

Observes killer reports for the given player

ObservePlayerDeathReports​

DeathReportDataService.ObservePlayerDeathReports() → Observable.Observable<DeathReportUtils.DeathReport>

Observes death reports for the given player

ObserveHumanoidKillerReports​

DeathReportDataService.ObserveHumanoidKillerReports() → Observable.Observable<DeathReportUtils.DeathReport>

Observes killer reports for the given humanoid

ObserveHumanoidDeathReports​

DeathReportDataService.ObserveHumanoidDeathReports() → Observable.Observable<DeathReportUtils.DeathReport>

Observes death reports for the given humanoid

ObserveCharacterKillerReports​

DeathReportDataService.ObserveCharacterKillerReports(
character: Model
) → Observable.Observable<DeathReportUtils.DeathReport>

Observes killer reports for the given character

ObserveCharacterDeathReports​

DeathReportDataService.ObserveCharacterDeathReports(
character: Model
) → Observable.Observable<DeathReportUtils.DeathReport>

Observes death reports for the given character

ObservePlayerKillTrackerBrio​

DeathReportDataService.ObservePlayerKillTrackerBrio() → Observable.Observable<Brio.Brio<TieInterface.TieInterface<any>>>

Observes the PlayerKillTracker bound to the player, through PlayerKillTrackerInterface in this realm.

ObservePlayerDeathTrackerBrio​

DeathReportDataService.ObservePlayerDeathTrackerBrio() → Observable.Observable<Brio.Brio<TieInterface.TieInterface<any>>>

Observes the PlayerDeathTracker bound to the player, through PlayerDeathTrackerInterface in this realm.

ObserveTeamKillTrackerBrio​

DeathReportDataService.ObserveTeamKillTrackerBrio() → Observable.Observable<Brio.Brio<TieInterface.TieInterface<any>>>

Observes the TeamKillTracker bound under the team, through TeamKillTrackerInterface in this realm.

ObservePlayerKillCount​

DeathReportDataService.ObservePlayerKillCount() → Observable.Observable<number?>

Observes the number of kills scored by the player. Emits nil -- rather than staying silent -- while no PlayerKillTracker is bound to the player, so a subscriber always has a current answer.

ObservePlayerDeathCount​

DeathReportDataService.ObservePlayerDeathCount() → Observable.Observable<number?>

Observes the number of deaths of the player. Emits nil -- rather than staying silent -- while no PlayerDeathTracker is bound to the player.

ObserveTeamKillCount​

DeathReportDataService.ObserveTeamKillCount() → Observable.Observable<number?>

Observes the number of kills scored by the team. Emits nil -- rather than staying silent -- while no TeamKillTracker is bound under the team.

GetLastDeathReports​

DeathReportDataService.GetLastDeathReports(self: DeathReportDataService) → {DeathReportUtils.DeathReport}

Gets the last recorded death reports, oldest first

HandleDeathReport​

DeathReportDataService.HandleDeathReport(
deathReport: DeathReportUtils.DeathReport
) → ()

Records a death report: remembers it, fires DeathReportDataService.NewDeathReport and routes it to the observers. Replication is the realm service's job.

Show raw api
{
    "functions": [
        {
            "name": "Init",
            "desc": "Initializes the service. Should be done via [ServiceBag].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportDataService"
                },
                {
                    "name": "serviceBag",
                    "desc": "",
                    "lua_type": "ServiceBag.ServiceBag"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 58,
                "path": "src/deathreport/src/Shared/DeathReportDataService.lua"
            }
        },
        {
            "name": "ObservePlayerKillerReports",
            "desc": "Observes killer reports for the given player",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportDataService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable.Observable<DeathReportUtils.DeathReport>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 101,
                "path": "src/deathreport/src/Shared/DeathReportDataService.lua"
            }
        },
        {
            "name": "ObservePlayerDeathReports",
            "desc": "Observes death reports for the given player",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportDataService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable.Observable<DeathReportUtils.DeathReport>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 113,
                "path": "src/deathreport/src/Shared/DeathReportDataService.lua"
            }
        },
        {
            "name": "ObserveHumanoidKillerReports",
            "desc": "Observes killer reports for the given humanoid",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportDataService"
                },
                {
                    "name": "humanoid",
                    "desc": "",
                    "lua_type": "Humanoid\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable.Observable<DeathReportUtils.DeathReport>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 125,
                "path": "src/deathreport/src/Shared/DeathReportDataService.lua"
            }
        },
        {
            "name": "ObserveHumanoidDeathReports",
            "desc": "Observes death reports for the given humanoid",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportDataService"
                },
                {
                    "name": "humanoid",
                    "desc": "",
                    "lua_type": "Humanoid\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable.Observable<DeathReportUtils.DeathReport>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 137,
                "path": "src/deathreport/src/Shared/DeathReportDataService.lua"
            }
        },
        {
            "name": "ObserveCharacterKillerReports",
            "desc": "Observes killer reports for the given character",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportDataService"
                },
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable.Observable<DeathReportUtils.DeathReport>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 149,
                "path": "src/deathreport/src/Shared/DeathReportDataService.lua"
            }
        },
        {
            "name": "ObserveCharacterDeathReports",
            "desc": "Observes death reports for the given character",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportDataService"
                },
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable.Observable<DeathReportUtils.DeathReport>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 161,
                "path": "src/deathreport/src/Shared/DeathReportDataService.lua"
            }
        },
        {
            "name": "ObservePlayerKillTrackerBrio",
            "desc": "Observes the [PlayerKillTracker] bound to the player, through [PlayerKillTrackerInterface] in\nthis realm.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportDataService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable.Observable<\n\tBrio.Brio<TieInterface.TieInterface<any>>\n>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 174,
                "path": "src/deathreport/src/Shared/DeathReportDataService.lua"
            }
        },
        {
            "name": "ObservePlayerDeathTrackerBrio",
            "desc": "Observes the [PlayerDeathTracker] bound to the player, through [PlayerDeathTrackerInterface] in\nthis realm.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportDataService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable.Observable<\n\tBrio.Brio<TieInterface.TieInterface<any>>\n>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 189,
                "path": "src/deathreport/src/Shared/DeathReportDataService.lua"
            }
        },
        {
            "name": "ObserveTeamKillTrackerBrio",
            "desc": "Observes the [TeamKillTracker] bound under the team, through [TeamKillTrackerInterface] in this\nrealm.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportDataService"
                },
                {
                    "name": "team",
                    "desc": "",
                    "lua_type": "Team\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable.Observable<\n\tBrio.Brio<TieInterface.TieInterface<any>>\n>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 204,
                "path": "src/deathreport/src/Shared/DeathReportDataService.lua"
            }
        },
        {
            "name": "ObservePlayerKillCount",
            "desc": "Observes the number of kills scored by the player. Emits nil -- rather than staying silent --\nwhile no [PlayerKillTracker] is bound to the player, so a subscriber always has a current answer.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportDataService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable.Observable<number?>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 219,
                "path": "src/deathreport/src/Shared/DeathReportDataService.lua"
            }
        },
        {
            "name": "ObservePlayerDeathCount",
            "desc": "Observes the number of deaths of the player. Emits nil -- rather than staying silent -- while no\n[PlayerDeathTracker] is bound to the player.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportDataService"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable.Observable<number?>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 236,
                "path": "src/deathreport/src/Shared/DeathReportDataService.lua"
            }
        },
        {
            "name": "ObserveTeamKillCount",
            "desc": "Observes the number of kills scored by the team. Emits nil -- rather than staying silent -- while\nno [TeamKillTracker] is bound under the team.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportDataService"
                },
                {
                    "name": "team",
                    "desc": "",
                    "lua_type": "Team\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable.Observable<number?>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 253,
                "path": "src/deathreport/src/Shared/DeathReportDataService.lua"
            }
        },
        {
            "name": "GetLastDeathReports",
            "desc": "Gets the last recorded death reports, oldest first",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportDataService"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ DeathReportUtils.DeathReport }\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 269,
                "path": "src/deathreport/src/Shared/DeathReportDataService.lua"
            }
        },
        {
            "name": "HandleDeathReport",
            "desc": "Records a death report: remembers it, fires [DeathReportDataService.NewDeathReport] and routes\nit to the observers. Replication is the realm service's job.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "DeathReportDataService"
                },
                {
                    "name": "deathReport",
                    "desc": "",
                    "lua_type": "DeathReportUtils.DeathReport\n"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 277,
                "path": "src/deathreport/src/Shared/DeathReportDataService.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "NewDeathReport",
            "desc": "Fires with every [DeathReport] handled in this realm",
            "lua_type": "Signal<DeathReport>",
            "source": {
                "line": 71,
                "path": "src/deathreport/src/Shared/DeathReportDataService.lua"
            }
        }
    ],
    "types": [],
    "name": "DeathReportDataService",
    "desc": "Realm-agnostic core of death reporting. Owns the per-subject report observers, the\n[DeathReportDataService.NewDeathReport] signal and the recent-report queue that\n[DeathReportService] and [DeathReportServiceClient] both expose. Each realm's service\nfeeds it reports -- the server from [DeathTrackedHumanoid], the client from remoting --\nand aliases its observers.",
    "source": {
        "line": 11,
        "path": "src/deathreport/src/Shared/DeathReportDataService.lua"
    }
}