Nuclide
Software Development Kit for id Technology (BETA)
GameRules_Home.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_Home(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
59 virtual string Title(void);
60
62 virtual bool ConsoleCommand(ncPlayer,string);
64 virtual bool ClientCommand(ncClient,string);
65
66 virtual void ChatMessageAll(ncClient cl, string strMessage);
67 virtual void ChatMessageTeam(ncClient cl, string strMessage);
68};
This entity class is the lowest client/player class.
Definition: Client.h:34
Internal Editor game rule.
Definition: GameRules_Editor.h:23
Internal Home game rule.
Definition: GameRules_Home.h:23
virtual void RestoreComplete(void)
Called when the entity has been successfully restored from a savegame file.
Definition: GameRules_Home.qc:57
virtual void LevelNewParms(void)
Overridable: Called to set up new level parms for any ncPlayer.
Definition: GameRules_Home.qc:35
virtual bool PlayerRequestRespawn(ncPlayer)
Overridable: called when a ncPlayer requests a respawn.
Definition: GameRules_Home.qc:225
virtual void Save(float)
Handles saving a copy of this entity to a given filehandle.
Definition: GameRules_Home.qc:40
virtual void LevelChangeParms(ncPlayer)
Overridable: Called to store parms for a specific ncPlayer.
Definition: GameRules_Home.qc:30
virtual string Title(void)
Returns the title of the gamemode running.
Definition: GameRules_Home.qc:118
virtual void ChatMessageAll(ncClient cl, string strMessage)
Called by Nuclide when the server has received a chat message that is to be distributed amongst all c...
Definition: GameRules_Home.qc:125
virtual void PlayerSpawn(ncPlayer)
Overridable: Called when a ncPlayer spawns, called sometime after joining.
Definition: GameRules_Home.qc:76
void ncGameRule_Home(void)
Definition: GameRules_Home.qc:20
virtual void ChatMessageTeam(ncClient cl, string strMessage)
Called by Nuclide when the server has received a chat message that is to be distributed amongst all c...
Definition: GameRules_Home.qc:168
virtual void FrameStart(void)
Overridable: Called every server frame.
Definition: GameRules_Home.qc:112
virtual void LevelDecodeParms(ncPlayer)
Overridable: Called to decode parms for a specific ncPlayer.
Definition: GameRules_Home.qc:25
virtual void Shutdown(void)
Overridable: Called from SV_Shutdown().
Definition: GameRules_Home.qc:107
virtual bool ConsoleCommand(ncPlayer, string)
Overridable: Called when the server issues a console command.
Definition: GameRules_Home.qc:186
virtual void Precache(void)
Overridable: Called from initents().
Definition: GameRules_Home.qc:69
virtual bool ClientCommand(ncClient, string)
Overridable: Called when a client issues a client command.
Definition: GameRules_Home.qc:234
virtual void InitPostEnts(void)
Overridable: Called when all map entities have initialized.
Definition: GameRules_Home.qc:63
virtual void Restore(string, string)
Similar to ncIO::SpawnKey() but for save-game fields.
Definition: GameRules_Home.qc:46
This entity class represents every player client.
Definition: Player.h:142