weapons.instance module¶
Provides a class to store information specific to each weapon.
- class weapons.instance.WeaponClass(name, basename, properties)[source]¶
Bases:
object
Class used to store information specific to the given weapon.
- static parse_weapon_constants(value, weapon_constants)[source]¶
Parses weapon constants.
- Returns:
Returns the value as it is if weapon constants cannot be found.
- property ammoprop¶
Return the ammoprop of the weapon.
- Returns:
None if the weapon doesn’t have ammo.
- Return type:
- property clip¶
Return the clip value of the weapon.
- Returns:
None if the weapon doesn’t have ammo.
- Return type:
- property cost¶
Return the cost of the weapon.
- Returns:
None if the cost data is missing.
- Return type:
- property id¶
Return the id of the weapon.
- Return type:
int/WeaponID
- property item_definition_index¶
Return the item definition index of the weapon.
- Returns:
None if the item defition index data is missing.
- Return type:
- property maxammo¶
Return the maxammo amount for the weapon.
- Returns:
None if the weapon doesn’t have ammo.
- Return type:
- property parent_class¶
Return the parent class of the weapon.
- Returns:
None if the parent class data is missing.
- Return type:
- property slot¶
Return the slot of the weapon.
- Return type:
int/WeaponSlot
- property type¶
Return the type of the weapon.
- Return type:
int/WeaponType