Nuclide
Software Development Kit for id Technology (BETA)
Stats.h
1/*
2 * Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
13 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
14 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
33var bool autocvar_logging_enabled = false;
34
35/* ncStats Logging
36
37A detailed record of a match or any game session.
38
39*/
40class
42{
43public:
44 nonvirtual void Init(void);
45 nonvirtual void Shutdown(void);
46
47 nonvirtual string OutputFilename(void);
48
49 nonvirtual void Game(string keyName, string setValue);
50 nonvirtual void Player(string keyName, string setValue);
51 nonvirtual void Map(string keyName, string setValue);
52 nonvirtual void JoinTeam(int teamID, ncPlayer leavingPlayer);
53 nonvirtual void LeaveTeam(int teamID, ncPlayer leavingPlayer);
54
55 /* player activities */
56 nonvirtual void Connect(ncClient connectingClient);
58 nonvirtual void Enter(ncPlayer enteringPlayer);
60 nonvirtual void Leave(ncPlayer leavingPlayer);
62 nonvirtual void Disconnect(ncPlayer disconnectinggPlayer);
64 nonvirtual void Respawn(ncPlayer respawningPlayer);
66 nonvirtual void NameChange(ncPlayer changedPlayer, string newName);
68 nonvirtual void Kill(ncPlayer killedPlayer, ncEntity inflicingEntity, ncEntity attackingEntity, int attackerScoreChange, string attackerWeapon, int killedScoreChange, string deadWeapon);
69
71 nonvirtual void PickupItem(ncItem takenItem, ncPlayer inflictingPlayer);
73 nonvirtual void UseItem(ncItem useditem, ncPlayer inflictingPlayer);
75 nonvirtual void DropItem(ncItem droppedItem, ncPlayer inflictingPlayer);
77 nonvirtual void ExpireItem(ncItem expiredItem, ncPlayer inflictingPlayer);
78
79 /* game state */
81 nonvirtual void StartGame(void);
83 nonvirtual void EndGame(string reasonString);
84
85private:
86 nonvirtual void Info(string, string);
87 nonvirtual string LocalTime(void);
88 nonvirtual string NetGamesTime(void);
89};
90 // end of logging
This entity class is the lowest client/player class.
Definition: Client.h:34
ncEntity is the lowest of the user-accessible entity class.
Definition: Entity.h:75
This entity class represents inventory items, weapons.
Definition: Item.h:138
This entity class represents every player client.
Definition: Player.h:142
Definition: Stats.h:42
var bool autocvar_logging_enabled
Definition: Stats.h:33