Shared definition of the cw_emptyration entity of the Ration Factory plugin, with the networked water, supplements and full flags and IsFull.

Originally written for the Iron Wall community.

Summary

Methods

Marks the packet full once it holds both the water and the supplements.
Draw()client
Draws the packet's model.
Explode()server
Plays the effect and sound of the packet breaking apart.
Draws what the packet contains and whether it is ready when the player looks at it.
Sets up the empty ration packet with 25 health and nothing inside.
IsFull()shared
Returns whether the packet holds both water and supplements.
Takes damage off the packet's health and breaks it when the health runs out.
Sets up the networked flags for the water, the supplements and the full state.
Absorbs a touching breens_water or citizen_supplements item entity the packet still lacks.
Makes the packet always transmit to clients.

Methods

Marks the packet full once it holds both the water and the supplements.

Draws the packet's model.

Plays the effect and sound of the packet breaking apart.

Draws what the packet contains and whether it is ready when the player looks at it.

Parameters

  • x
  • y
  • alpha

Sets up the empty ration packet with 25 health and nothing inside.

Returns whether the packet holds both water and supplements.

Returns

  • Boolean Whether the packet is full

Takes damage off the packet's health and breaks it when the health runs out.

Parameters

  • damageInfo

Sets up the networked flags for the water, the supplements and the full state.

Absorbs a touching breens_water or citizen_supplements item entity the packet still lacks.

The item is flagged as it is absorbed: it only disappears at the end of the tick, and could fill a second packet that touches it until then.

Parameters

  • ent

Makes the packet always transmit to clients.

Defined in