Shared definition of the cw_shipment entity: a non-spawnable anim entity named Shipment with a networked item Index and an ENT:GetItemTable accessor.

Summary

Methods

Draw()client
Draws the shipment model unless the ShipmentEntityDraw hook returns false.
Plays a glass impact effect and a soft impact sound at the entity's position.
Returns the item the shipment contains.
Draws the shipment title and the name of the item it contains when looked at.
Sets up physics, simple use and 50 health for the shipment.
Drops the shipment's items into the world, unless the server is shutting down.
Subtracts the damage from the shipment's health and destroys it at zero health.
Fills the shipment with new instances of an item and sets its model, weight and space.
Sets up the networked Index integer holding the shipped item's index.
Think()server
Removes the shipment once a second check finds it outside the world.
Always transmits the shipment to every client.

Methods

Draws the shipment model unless the ShipmentEntityDraw hook returns false.

Plays a glass impact effect and a soft impact sound at the entity's position.

Parameters

  • scale Number optional, defaults to nil Unused; the effect scale is always 8

Returns the item the shipment contains.

On the client it looks the item up by the networked index.

Returns

  • Item The shipped item, or nil if it is not set

Draws the shipment title and the name of the item it contains when looked at.

Parameters

  • x
  • y
  • alpha

Sets up physics, simple use and 50 health for the shipment.

Drops the shipment's items into the world, unless the server is shutting down.

Subtracts the damage from the shipment's health and destroys it at zero health.

Parameters

  • damageInfo

Fills the shipment with new instances of an item and sets its model, weight and space.

Uses the item's shipmentModel, or the model_shipment option. Does nothing for an unknown item.

Parameters

  • uniqueID String The unique ID of the item to ship
  • batch Number How many instances to put in the shipment

Sets up the networked Index integer holding the shipped item's index.

Removes the shipment once a second check finds it outside the world.

Always transmits the shipment to every client.

Defined in