Hooks - GoonHouse/Marin0SE GitHub Wiki
This version makes use of hooks that I put all over the place. Here they are. All arguments are in order. If there are none listed then it has none.
Love
- LovePreDraw unlike the name implies, it is the first thing called inside the
love.draw()
function, please forgive our insolence. - LovePostDraw same as above, except at the end.
- LovePreUpdate Called each update.
- dt This is the engine dt, not the math.min'd one.
- LovePostUpdate Same as above.
- LovePreLoad Called when loaded.
- args The array of launch arguments.
- LovePostLoad Same as above.
Game
- GameLoaded is called at the end of
menu_load()
, which is after the intro. - GameConsoleOpened is called whenever the cupid console is opened.
- GameConsoleClosed is called whenever the cupid console is closed.
- GameOnlineMenuLoaded is called at the end of
onlinemenu_load()
, which is necessary for some initialization.
Server
- ServerClientConnected is called at the end of
server_callback_connect()
after issuing theconnected
response to the client. This is also called when the hosting player opens the lobby because they are a client to their own server.- clientid
int
is the index of the player's info in theserver_peerlist
, which is usually stored on the client asnetworkclientnumber
. - ip
string
is the IP of the client that connected. - port
string
is the port number that the client is accessing through.
- clientid