Skip to content

Use strong typing for all targeting APIs in GameSystem and its subclasses #2259

@moyerr

Description

@moyerr

We occasionally run into issues caused by the fact that some of GameSystem's target-based APIs strip all type information by using any. So we can't always reliably know that the parameters passed to subclasses with narrower type constraints are actually receiving the types they think they are.

For example, PlayerTargetSystem's addPropertiesToEvent method expects a Player for its target parameter, but when the superclass calls that method, it passes in an untyped any, which occasionally resolves to an array of Players.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions