2024-05-27 19:53:29 +03:00
|
|
|
# List of available hooks:
|
|
|
|
|
2024-10-12 13:55:31 +03:00
|
|
|
- `ctx.hook.on_world_initialized()` - called on OnWorldInitialized.
|
2025-02-09 10:09:32 -05:00
|
|
|
- `ctx.hook.on_new_entity(ent)` - called on new alive entity.
|
2024-10-12 13:55:31 +03:00
|
|
|
- `ctx.hook.on_world_update()` - called on OnWorldPreUpdate.
|
2025-02-09 10:25:45 -05:00
|
|
|
- `ctx.hook.on_world_update_post()` - called on OnWorldPostUpdate.
|
2024-10-12 13:55:31 +03:00
|
|
|
- `ctx.hook.on_world_update_client()` - called on OnWorldPreUpdate, but only on clients.
|
|
|
|
- `ctx.hook.on_world_update_host()` - called on OnWorldPreUpdate, but only on host.
|
|
|
|
- `ctx.hook.on_new_player_seen(new_playerdata, player_count)` - called the first time player with this peer_id has entered the world.
|
|
|
|
- `ctx.hook.on_local_player_spawn(my_player)` - called when the *local* gets spawned. `my_player` is playerdata table for this player.
|
2024-05-27 19:53:29 +03:00
|
|
|
- `ctx.hook.on_client_spawned(peer_id, new_playerdata)`
|
2024-10-12 13:55:31 +03:00
|
|
|
- `ctx.hook.on_should_send_updates()` - called either when we connect, or somebody else connects (and sends "welcome" message).
|
2024-08-22 17:53:14 +03:00
|
|
|
- `ctx.hook.on_draw_debug_window(imgui)`
|
2024-09-01 12:51:50 +03:00
|
|
|
- `ctx.hook.on_local_player_polymorphed(currently_polymorphed)`
|
|
|
|
- `ctx.hook.on_client_polymorphed(peer_id, player_data)`
|
2025-02-09 10:09:32 -05:00
|
|
|
- `ctx.hook.on_late_init()` - called on OnModPostInit.
|