@@ -2,7 +2,7 @@ function Mode() {
2
2
this . ID = - 1 ;
3
3
this . name = "Blank" ;
4
4
this . decayMod = 1.0 ; // Modifier for decay rate (Multiplier)
5
- this . packetLB = 49 ; // Packet id for leaderboard packet (49 = List, 50 = Pie chart)
5
+ this . packetLB = 49 ; // Packet id for leaderboard packet (48 = Text List, 49 = List, 50 = Pie chart)
6
6
this . haveTeams = false ; // True = gamemode uses teams, false = gamemode doesnt use teams
7
7
8
8
this . rankOne ; // Current player that has the highest score
@@ -16,10 +16,33 @@ Mode.prototype.onServerInit = function(gameServer) {
16
16
// Called when the server starts
17
17
}
18
18
19
+ Mode . prototype . onServerUpdate = function ( gameServer ) {
20
+ // Called during each server update tick
21
+ }
22
+
19
23
Mode . prototype . onPlayerInit = function ( player ) {
20
24
// Called after a player object is constructed
21
25
}
22
26
27
+ Mode . prototype . onPlayerSpawn = function ( gameServer , player ) {
28
+ // Called when a player is spawned
29
+ gameServer . spawnPlayer ( player ) ;
30
+ }
31
+
32
+ Mode . prototype . pressQ = function ( gameServer , player ) {
33
+ // Called when the Q key is pressed
34
+ }
35
+
36
+ Mode . prototype . pressW = function ( gameServer , player ) {
37
+ // Called when the W key is pressed
38
+ gameServer . ejectMass ( player ) ;
39
+ }
40
+
41
+ Mode . prototype . pressSpace = function ( gameServer , player ) {
42
+ // Called when the Space bar is pressed
43
+ gameServer . splitCells ( player ) ;
44
+ }
45
+
23
46
Mode . prototype . onCellAdd = function ( cell ) {
24
47
// Called when a player cell is added
25
48
}
0 commit comments