Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HookType missing values #17512

Open
DanStevens opened this issue Jul 6, 2022 · 1 comment · May be fixed by #21574
Open

HookType missing values #17512

DanStevens opened this issue Jul 6, 2022 · 1 comment · May be fixed by #21574
Labels
plug-in Related to the plugin system of OpenRCT2. question/help Helping someone with information on how to accomplish something.

Comments

@DanStevens
Copy link
Contributor

Is the HookType in openrct2.d.ts missing values?

type HookType =
"interval.tick" | "interval.day" |
"network.chat" | "network.action" | "network.join" | "network.leave" |
"ride.ratings.calculate" | "action.location" | "vehicle.crash" |
"map.change" | "map.changed" | "map.save";

Looking earlier in the file for allowed calls to the Context.subscribe function...

subscribe(hook: HookType, callback: Function): IDisposable;
subscribe(hook: "action.query", callback: (e: GameActionEventArgs) => void): IDisposable;
subscribe(hook: "action.execute", callback: (e: GameActionEventArgs) => void): IDisposable;
subscribe(hook: "interval.tick", callback: () => void): IDisposable;
subscribe(hook: "interval.day", callback: () => void): IDisposable;
subscribe(hook: "network.chat", callback: (e: NetworkChatEventArgs) => void): IDisposable;
subscribe(hook: "network.authenticate", callback: (e: NetworkAuthenticateEventArgs) => void): IDisposable;
subscribe(hook: "network.join", callback: (e: NetworkEventArgs) => void): IDisposable;
subscribe(hook: "network.leave", callback: (e: NetworkEventArgs) => void): IDisposable;
subscribe(hook: "ride.ratings.calculate", callback: (e: RideRatingsCalculateArgs) => void): IDisposable;
subscribe(hook: "action.location", callback: (e: ActionLocationArgs) => void): IDisposable;
subscribe(hook: "guest.generation", callback: (e: GuestGenerationArgs) => void): IDisposable;
subscribe(hook: "vehicle.crash", callback: (e: VehicleCrashArgs) => void): IDisposable;
subscribe(hook: "map.save", callback: () => void): IDisposable;
subscribe(hook: "map.change", callback: () => void): IDisposable;

...suggests that the following values are missing:

  • "action.query"
  • "action.execute"
  • "network.authenticate"
  • "guest.generation"

If this intentional, please close this issue.

@Gymnasiast Gymnasiast added question/help Helping someone with information on how to accomplish something. plug-in Related to the plugin system of OpenRCT2. labels Jul 7, 2022
@KatieZeldaKat
Copy link
Contributor

In addition, it seems as though the HookType of "network.action" has no explicit listing like the others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plug-in Related to the plugin system of OpenRCT2. question/help Helping someone with information on how to accomplish something.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants