module.tscript.template 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. function @@::onCreate(%this)
  2. {
  3. }
  4. function @@::onDestroy(%this)
  5. {
  6. }
  7. //This is called when the server is initially set up by the game application
  8. function @@::initServer(%this)
  9. {
  10. //--FILE EXEC BEGIN--
  11. //--FILE EXEC END--
  12. }
  13. //This is called when the server is created for an actual game/map to be played
  14. function @@::onCreateGameServer(%this)
  15. {
  16. //--DATABLOCK EXEC BEGIN--
  17. //These are common managed data files. For any datablock-based stuff that gets generated by the editors
  18. //(that doesn't have a specific associated file, like data for a player class) will go into these.
  19. //So we'll register them now if they exist.
  20. %this.registerDatablock("./scripts/managedData/managedDatablocks");
  21. %this.registerDatablock("./scripts/managedData/managedForestItemData");
  22. %this.registerDatablock("./scripts/managedData/managedForestBrushData");
  23. %this.registerDatablock("./scripts/managedData/managedParticleEmitterData");
  24. %this.registerDatablock("./scripts/managedData/managedParticleData");
  25. //--DATABLOCK EXEC END--
  26. }
  27. //This is called when the server is shut down due to the game/map being exited
  28. function @@::onDestroyGameServer(%this)
  29. {
  30. }
  31. //This is called when the client is initially set up by the game application
  32. function @@::initClient(%this)
  33. {
  34. //--FILE EXEC BEGIN--
  35. //--FILE EXEC END--
  36. }
  37. //This is called when a client connects to a server
  38. function @@::onCreateClientConnection(%this)
  39. {
  40. }
  41. //This is called when a client disconnects from a server
  42. function @@::onDestroyClientConnection(%this)
  43. {
  44. }