Nuclide
Software Development Kit for id Technology (BETA)
GameRules_SinglePlayer.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_SinglePlayer(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);
39
41 virtual void InitPostEnts(void);
42
43 /* logic */
45 virtual void Precache(void);
46
48 virtual void Shutdown(void);
49
51 virtual void FrameStart(void);
52
53
55 virtual string Title(void);
56};
Internal SinglePlayer game rule.
Definition: GameRules_SinglePlayer.h:23
virtual void RestoreComplete(void)
Called when the entity has been successfully restored from a savegame file.
Definition: GameRules_SinglePlayer.qc:79
void ncGameRule_SinglePlayer(void)
Definition: GameRules_SinglePlayer.qc:19
virtual void Precache(void)
Overridable: Called from initents().
Definition: GameRules_SinglePlayer.qc:90
virtual void InitPostEnts(void)
Overridable: Called when all map entities have initialized.
Definition: GameRules_SinglePlayer.qc:85
virtual void LevelChangeParms(ncPlayer)
Overridable: Called to store parms for a specific ncPlayer.
Definition: GameRules_SinglePlayer.qc:39
virtual void LevelDecodeParms(ncPlayer)
Overridable: Called to decode parms for a specific ncPlayer.
Definition: GameRules_SinglePlayer.qc:24
virtual string Title(void)
Returns the title of the gamemode running.
Definition: GameRules_SinglePlayer.qc:107
virtual void Restore(string, string)
Similar to ncIO::SpawnKey() but for save-game fields.
Definition: GameRules_SinglePlayer.qc:68
virtual void FrameStart(void)
Overridable: Called every server frame.
Definition: GameRules_SinglePlayer.qc:101
virtual void Shutdown(void)
Overridable: Called from SV_Shutdown().
Definition: GameRules_SinglePlayer.qc:96
virtual void LevelNewParms(void)
Overridable: Called to set up new level parms for any ncPlayer.
Definition: GameRules_SinglePlayer.qc:54
virtual void Save(float)
Handles saving a copy of this entity to a given filehandle.
Definition: GameRules_SinglePlayer.qc:62
This entity class represents every player client.
Definition: Player.h:142
This class represents active gamerules.
Definition: GameRules.h:152