Nuclide
Software Development Kit for id Tech

Server-side plugin wrappers for weapon related functions. More...

Functions

string weaponType (string weaponDef)
 
int weaponStartAmmo (string weaponDef)
 
int weaponMaxAmmo (string weaponDef)
 
bool weaponIsSemiAuto (string weaponDef)
 
string weaponInventoryType (string weaponDef)
 
float weaponFireTime (string weaponDef)
 
int weaponClipSize (string weaponDef)
 
string weaponClass (string weaponDef)
 
bool isWeaponClipOnly (string weaponDef)
 
bool isWeaponDetonationTimed (string weaponDef)
 

Detailed Description

Server-side plugin wrappers for weapon related functions.

Function Documentation

◆ isWeaponClipOnly()

bool isWeaponClipOnly ( string  weaponDef)
Returns
true/false whether the weapon takes its ammo only through its clip.
Parameters
weaponDefthe name of the entityDef that defines the weapon.

◆ isWeaponDetonationTimed()

bool isWeaponDetonationTimed ( string  weaponDef)
Returns
true/false whether or not the weapon creates a timed, fused detonating charge of sorts.
Parameters
weaponDefthe name of the entityDef that defines the weapon.

◆ weaponClass()

string weaponClass ( string  weaponDef)
Returns
The 'class' of weapon. Not spawnclass.
Parameters
weaponDefthe name of the entityDef that defines the weapon.

◆ weaponClipSize()

int weaponClipSize ( string  weaponDef)
Returns
The delay (in seconds) betwen shots of the specified weapon.
Parameters
weaponDefthe name of the entityDef that defines the weapon.

◆ weaponFireTime()

float weaponFireTime ( string  weaponDef)
Returns
The delay (in seconds) betwen shots of the specified weapon.
Parameters
weaponDefthe name of the entityDef that defines the weapon.

◆ weaponInventoryType()

string weaponInventoryType ( string  weaponDef)
Returns
How this weapon is stored. Usually "item", unless it's temporary.
Parameters
weaponDefthe name of the entityDef that defines the weapon.

◆ weaponIsSemiAuto()

bool weaponIsSemiAuto ( string  weaponDef)
Returns
Whether the weapon is semi automatic.
Parameters
weaponDefthe name of the entityDef that defines the weapon.

◆ weaponMaxAmmo()

int weaponMaxAmmo ( string  weaponDef)
Returns
The amount of ammo the weapon can hold in total when it comes to reserve ammo. So this is really returning the max ammo of a given ammo type.
Parameters
weaponDefthe name of the entityDef that defines the weapon.

◆ weaponStartAmmo()

int weaponStartAmmo ( string  weaponDef)
Returns
The amount of ammo the specified weapon is meant to start with, when first given to the player. This can be distributed to both clip and reserve ammo types.
Parameters
weaponDefthe name of the entityDef that defines the weapon.

◆ weaponType()

string weaponType ( string  weaponDef)
Returns
the "attack" type of the weapon.
Parameters
weaponDefthe name of the entityDef that defines the weapon.
Returns
Attack type of the weapon.