1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

[Plugin API] Fix: add missing hook types, order & style (#22134)

This commit is contained in:
Arnold Zhou
2024-07-23 20:49:57 +10:00
committed by GitHub
parent 035e4091e9
commit 2da5ed6517

View File

@@ -496,20 +496,20 @@ declare global {
*/
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: "action.location", callback: (e: ActionLocationArgs) => void): IDisposable;
subscribe(hook: "action.query", callback: (e: GameActionEventArgs) => void): IDisposable;
subscribe(hook: "guest.generation", callback: (e: GuestGenerationArgs) => void): IDisposable;
subscribe(hook: "interval.day", callback: () => void): IDisposable;
subscribe(hook: "network.chat", callback: (e: NetworkChatEventArgs) => void): IDisposable;
subscribe(hook: "interval.tick", callback: () => void): IDisposable;
subscribe(hook: "map.change", callback: () => void): IDisposable;
subscribe(hook: "map.save", callback: () => void): IDisposable;
subscribe(hook: "network.authenticate", callback: (e: NetworkAuthenticateEventArgs) => void): IDisposable;
subscribe(hook: "network.chat", callback: (e: NetworkChatEventArgs) => 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;
/**
* Can only be used in intransient plugins.
@@ -620,10 +620,21 @@ declare global {
"footpath_railings";
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";
"action.execute" |
"action.location" |
"action.query" |
"guest.generation" |
"interval.day" |
"interval.tick" |
"map.change" |
"map.changed" |
"map.save" |
"network.authenticate" |
"network.chat" |
"network.join" |
"network.leave" |
"ride.ratings.calculate" |
"vehicle.crash";
type ExpenditureType =
"ride_construction" |