weapons.manager module

Provides weapon information for the current game.

class weapons.manager._WeaponManager[source]

Bases: dict

Dictionary class to store basic weapon information.

__init__()[source]

Load the ini file into the dictionary.

_format_name(item)[source]

Format the name to include the game’s weapon prefix.

get(item, default=None)[source]

Return the weapons.instance.WeaponClass for the weapon.

Parameters:
  • item (str) – The weapon to retrieve the instance of.
  • default – The value to return if the item is not found.
Return type:

WeaponClass

ammoprop

Return the ammoprop property for the server.

myweapons

Return the myweapons property for the server.

prefix

Return the weapon prefix value for the server.

projectiles

Return the projectiles for the server.

special_names

Return the special_names for the server.

tags

Return the weapon tags for the server.

weapons.manager.weapon_manager

The singleton object of the _WeaponManager class.

If the game is not supported, weapons.default.NoWeaponManager will be used instead.