Nuclide
Software Development Kit for id Technology (BETA)
Loading...
Searching...
No Matches
entityDef.h
1/*
2 * Copyright (c) 2023-2024 Vera Visions LLC.
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
92
93#ifndef ENTITYDEF_MAX
95#define ENTITYDEF_MAX 512
96#endif
97
99enum
100{
106};
107
109typedef struct
110{
111 string entClass;
113 string spawnData;
115
116 string tweakDefs; /* when (field) equals/greater-than/less-than/is-not (value) */
117 string tweakKeys;
118
119 string eventList; /* model events */
123
124void EntityDef_Init(void);
125void EntityDef_DebugList(void);
126string EntityDef_GetKeyValue(string, string);
127int EntityDef_NetIDFromName(string);
128string EntityDef_NameFromNetID(int);
129void EntityDef_SetFromEntNum(ncItem targetItem, int defNum);
130int EntityDef_IDFromName(string);
131string EntityDef_GetSpawnData(int);
132bool EntityDef_HasSpawnClass(string className);
133
134#ifdef SERVER
135bool EntityDef_Precache(string);
136ncEntity EntityDef_SwitchClass(ncEntity target, string className);
137ncEntity Entity_CreateClass(string className);
138
139ncEntity EntityDef_NewClassname(string className);
140#endif
141 // end of entitydef
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
int EntityDef_NetIDFromName(string)
Definition entityDef.qc:717
string EntityDef_GetKeyValue(string, string)
Retrieves the value of a specific key defined within an EntityDef.
Definition entityDef.qc:278
ncEntity EntityDef_SwitchClass(ncEntity target, string className)
Definition entityDef.qc:618
string EntityDef_GetSpawnData(int)
Definition entityDef.qc:789
bool EntityDef_HasSpawnClass(string className)
Checks if an entity class was defined in an EntityDef.
Definition entityDef.qc:679
void EntityDef_DebugList(void)
Definition entityDef.qc:691
int EntityDef_IDFromName(string)
Definition entityDef.qc:735
void EntityDef_Init(void)
Definition entityDef.qc:173
ncEntity EntityDef_NewClassname(string className)
Definition entityDef.qc:580
bool EntityDef_Precache(string)
Definition entityDef.qc:557
void EntityDef_SetFromEntNum(ncItem targetItem, int defNum)
Definition entityDef.qc:763
string EntityDef_NameFromNetID(int)
Definition entityDef.qc:749
ncEntity Entity_CreateClass(string className)
Always returns a valid entity.
Definition entityDef.qc:665
@ EDEFTWEAK_GT
Greater-Than Check.
Definition entityDef.h:103
@ EDEFTWEAK_LT
Less-Than Check.
Definition entityDef.h:102
@ EDEFTWEAK_NOT
Not (Invert) Gate.
Definition entityDef.h:104
@ EDEFTWEAK_EQ
Equals Check.
Definition entityDef.h:101
@ EDEFTWEAK_CONTAINS
Contains Bit (&) Check.
Definition entityDef.h:105
Data holding EntityDef entries.
Definition entityDef.h:110
string entClass
Definition entityDef.h:111
string spawnData
Definition entityDef.h:113
string eventList
Definition entityDef.h:119
int inheritID
Definition entityDef.h:121
string spawnClass
Definition entityDef.h:112
string tweakDefs
Definition entityDef.h:116
string tweakKeys
Definition entityDef.h:117
string inheritKeys
Definition entityDef.h:114
bool precacheDone
Definition entityDef.h:120