Advertisement
robn

events.lua

May 3rd, 2011
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.59 KB | None | 0 0
  1. local onGameStart = function ()
  2.     print("onGameStart")
  3. end
  4.  
  5. local onGameEnd = function ()
  6.     print("onGameEnd")
  7. end
  8.  
  9. local onEnterSystem = function (ship)
  10.     print(string.format("onEnterSystem: ship %s", ship.label))
  11. end
  12.  
  13. local onLeaveSystem = function (ship)
  14.     print(string.format("onLeaveSystem: ship %s", ship.label))
  15. end
  16.  
  17. local onShipHit = function (ship, other)
  18.     print(string.format("onShipHit: ship %s other %s", ship.label, other.label))
  19. end
  20.  
  21. local onShipDestroyed = function (ship, other)
  22.     print(string.format("onShipDestroyed: ship %s other %s", ship.label, other.label))
  23. end
  24.  
  25. local onShipCollided = function (ship, other)
  26.     print(string.format("onShipCollided: ship %s other %s", ship.label, other.label))
  27. end
  28.  
  29. local onShipDocked = function (ship, station)
  30.     print(string.format("onShipDocked: ship %s station %s", ship.label, station.label))
  31. end
  32.  
  33. local onShipUndocked = function (ship, station)
  34.     print(string.format("onShipUndocked: ship %s station %s", ship.label, station.label))
  35. end
  36.  
  37. local onJettison = function (ship, cargo)
  38.     print(string.format("onJettison: ship %s cargo %s", ship.label, cargo.label))
  39. end
  40.  
  41. EventQueue.onGameStart:Connect(onGameStart)
  42. EventQueue.onGameEnd:Connect(onGameEnd)
  43. EventQueue.onEnterSystem:Connect(onEnterSystem)
  44. EventQueue.onLeaveSystem:Connect(onLeaveSystem)
  45. EventQueue.onShipHit:Connect(onShipHit)
  46. EventQueue.onShipDestroyed:Connect(onShipDestroyed)
  47. EventQueue.onShipCollided:Connect(onShipCollided)
  48. EventQueue.onShipDocked:Connect(onShipDocked)
  49. EventQueue.onShipUndocked:Connect(onShipUndocked)
  50. EventQueue.onJettison:Connect(onJettison)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement