Nuclide
Software Development Kit for id Technology (BETA)
GameRules_DevShutterbug.h
1/*
2 * Copyright (c) 2025 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
23{
24public:
25 void ncGameRule_DevShutterbug(void);
26
27 /* overrides */
28 virtual void Save(float);
29 virtual void Restore(string,string);
30 virtual void RestoreComplete(void);
31
32 /* level transitions */
34 virtual void LevelNewParms(void);
36 virtual void LevelChangeParms(ncPlayer);
38 virtual void LevelDecodeParms(ncPlayer);
40 virtual void PlayerSpawn(ncPlayer);
41
43 virtual void InitPostEnts(void);
44
45 virtual bool PlayerRequestRespawn(ncPlayer);
46
47 /* logic */
49 virtual void Precache(void);
50
52 virtual void Shutdown(void);
53
55 virtual void FrameStart(void);
56
57 virtual void IntermissionEnd();
58
59
61 virtual string Title(void);
62
64 virtual bool ConsoleCommand(ncPlayer,string);
66 virtual bool ClientCommand(ncClient,string);
67
68 nonvirtual int NumActiveGamePlayers(void);
69 nonvirtual int NumActiveEditors(void);
70
71private:
72 ncClient m_sessionCreator;
73 bool m_shotTaken;
74};
This entity class is the lowest client/player class.
Definition: Client.h:34
Internal Editor game rule.
Definition: GameRules_DevShutterbug.h:23
virtual void PlayerSpawn(ncPlayer)
Overridable: Called when a ncPlayer spawns, called sometime after joining.
Definition: GameRules_DevShutterbug.qc:176
virtual void Restore(string, string)
Similar to ncIO::SpawnKey() but for save-game fields.
Definition: GameRules_DevShutterbug.qc:87
virtual void Shutdown(void)
Overridable: Called from SV_Shutdown().
Definition: GameRules_DevShutterbug.qc:219
virtual bool ClientCommand(ncClient, string)
Overridable: Called when a client issues a client command.
Definition: GameRules_DevShutterbug.qc:324
virtual string Title(void)
Returns the title of the gamemode running.
Definition: GameRules_DevShutterbug.qc:230
virtual void Save(float)
Handles saving a copy of this entity to a given filehandle.
Definition: GameRules_DevShutterbug.qc:81
virtual void LevelNewParms(void)
Overridable: Called to set up new level parms for any ncPlayer.
Definition: GameRules_DevShutterbug.qc:73
virtual bool PlayerRequestRespawn(ncPlayer)
Overridable: called when a ncPlayer requests a respawn.
Definition: GameRules_DevShutterbug.qc:254
virtual void RestoreComplete(void)
Called when the entity has been successfully restored from a savegame file.
Definition: GameRules_DevShutterbug.qc:98
virtual void IntermissionEnd()
Called when intermission ends.
Definition: GameRules_DevShutterbug.qc:185
virtual void FrameStart(void)
Overridable: Called every server frame.
Definition: GameRules_DevShutterbug.qc:224
virtual void LevelDecodeParms(ncPlayer)
Overridable: Called to decode parms for a specific ncPlayer.
Definition: GameRules_DevShutterbug.qc:43
virtual void Precache(void)
Overridable: Called from initents().
Definition: GameRules_DevShutterbug.qc:170
nonvirtual int NumActiveGamePlayers(void)
Definition: GameRules_DevShutterbug.qc:260
void ncGameRule_DevShutterbug(void)
Definition: GameRules_DevShutterbug.qc:20
virtual bool ConsoleCommand(ncPlayer, string)
Overridable: Called when the server issues a console command.
Definition: GameRules_DevShutterbug.qc:237
nonvirtual int NumActiveEditors(void)
Definition: GameRules_DevShutterbug.qc:273
virtual void InitPostEnts(void)
Overridable: Called when all map entities have initialized.
Definition: GameRules_DevShutterbug.qc:104
virtual void LevelChangeParms(ncPlayer)
Overridable: Called to store parms for a specific ncPlayer.
Definition: GameRules_DevShutterbug.qc:58
This entity class represents every player client.
Definition: Player.h:142
This class represents active gamerules.
Definition: GameRules.h:152