Shared definition of the cw_wood entity, a copy of cw_garbage that keeps its Garbage Spawnpoint name, the
TYPE_WATERCAN and TYPE_SUPPLIES globals and the networked index variable.
Summary
Methods
TYPE_WATERCAN or TYPE_SUPPLIES only.index).TRANSMIT_ALWAYS, so the node is networked to every client.Methods
ENT:CanTool(player, trace, tool)
server gamemodes/cwhl2rp/plugins/gathering/plugin/entities/entities/cw_wood/init.lua:93Blocks every tool on the node.
Parameters
- player
- trace
- tool
Returns
- Boolean Always
false
ENT:Draw()
client gamemodes/cwhl2rp/plugins/gathering/plugin/entities/entities/cw_wood/cl_init.lua:6Draws the node's model.
ENT:Initialize()
shared gamemodes/cwhl2rp/plugins/gathering/plugin/entities/entities/cw_wood/init.lua:12On the server
Picks a random garbage model and sets up the node's physics, colliding only with the world.
On the client
Does nothing on the client.
Defined in
ENT:PhysicsUpdate(physicsObject)
server gamemodes/cwhl2rp/plugins/gathering/plugin/entities/entities/cw_wood/init.lua:53Stops the node from moving unless a player holds it or it is constrained.
Parameters
- physicsObject
ENT:SetSpawnType(entType)
server gamemodes/cwhl2rp/plugins/gathering/plugin/entities/entities/cw_wood/init.lua:39Stores the node's type in the networked int 1, for TYPE_WATERCAN or TYPE_SUPPLIES only.
Parameters
- entType Number
TYPE_WATERCANorTYPE_SUPPLIES
ENT:SetupDataTables()
shared gamemodes/cwhl2rp/plugins/gathering/plugin/entities/entities/cw_wood/shared.lua:17Sets up the networked int 0 (index).
ENT:Think()
client gamemodes/cwhl2rp/plugins/gathering/plugin/entities/entities/cw_wood/cl_init.lua:15Does nothing on the client.
ENT:UpdateTransmitState()
server gamemodes/cwhl2rp/plugins/gathering/plugin/entities/entities/cw_wood/init.lua:48Returns TRANSMIT_ALWAYS, so the node is networked to every client.
Returns
- Number
TRANSMIT_ALWAYS
ENT:Use(activator, caller)
server gamemodes/cwhl2rp/plugins/gathering/plugin/entities/entities/cw_wood/init.lua:64Starts searching the node when a crouching, untied player uses it, like a garbage pile.
The search takes GetGarbageTime seconds within 192 units and runs PlayerTakeGarbage
before removing the node.
Parameters
- activator
- caller