Defines the Filter item (filter) of the Radiation plugin, a gas mask filter with an energy charge that is swapped into the player's equipped gasmask item, or into the cp_filter character data for Civil Protection.

The filter that was in use is given back as a new filter item when it still has charge, and the item's description shows the remaining charge.

Summary

Methods

Returns the filter's description with its remaining charge appended.
Called when the filter is dropped; does nothing, so it can be dropped freely.
Swaps the filter into the player's gas mask, returning the old filter if it had charge left.

Methods

Returns the filter's description with its remaining charge appended.

Returns

  • String The description, or false when it is empty

Called when the filter is dropped; does nothing, so it can be dropped freely.

Parameters

  • player
  • position

Swaps the filter into the player's gas mask, returning the old filter if it had charge left.

Civil Protection refill their cp_filter character data; other players need an equipped gas mask, otherwise the filter is not used up.

Parameters

  • player
  • itemEntity

Returns

  • Boolean false when the player has no equipped gas mask

Defined in