CityRP Documentation Repository

cityrp_deposit

Deposit base entity - client.

Functions

ServerENT:DispatchBreak(ply, amount, dmginfo)Source ☍

Shakes nearby players' screens and shows everyone the deposit bursting, with its final payout flying to the player who broke it. Called before the deposit removes itself.

Parameters

  • plyPlayerThe player who broke the deposit.
  • amountintegerHow many of the loot ore were paid out, 0 when the payout failed.
  • dmginfoCTakeDamageInfoThe breaking swing's damage, whose position the deposit bursts from.
ServerENT:DispatchGather(ply, item, amount, dmginfo)Source ☍

Shows everyone nearby the ore a player just gathered flying from the deposit to them.

Parameters

  • plyPlayerThe player who received the ore.
  • itemstringThe uniqueID of the item received.
  • amountintegerHow many were received.
  • dmginfoCTakeDamageInfoThe swing's damage, whose position the ore comes out of.
ClientENT:GetShudderOffset() → Vector?Source ☍

Returns how far the deposit is shaken from where it stands while it shudders.

Returns

  1. Vector?The shake, or nil when the deposit is still.
ClientENT:GetSinkOffset() → numberSource ☍

Returns how far below its networked position the deposit is drawn while it eases down. The server moves the deposit in steps; each step down is eased into here, with dust at the base.

Returns

  1. numberUnits to raise the drawn deposit by, 0 once it has caught up.
ClientENT:GetSinkOffsetAt(time) → numberSource ☍

Returns the sink ease's offset at a point in time.

Parameters

  • timenumberThe CurTime to evaluate at.

Returns

  1. numberUnits above the networked position.
ClientENT:GetVeinMaterial() → IMaterial?, integer?Source ☍

Returns this deposit class's tinted copy of its vein material, building it on first use. The copy is made rather than tinting the source because every deposit on that skin shares it.

Returns

  1. 1IMaterial?The tinted material, or nil if the class keeps its skin's own.
  2. 2integer?The source's zero-based index in the model's material list.
ClientENT:PuffSinkDust()Source ☍

Raises a ring of dust where the deposit meets the ground.

ClientENT:SampleLight() → VectorSource ☍

Samples the light falling on the top of the deposit. The top is used because the origin sinks underground as the deposit is mined.

Returns

  1. VectorPer-channel multipliers between the light floor and 1.
ClientENT:Shudder()Source ☍

Starts the brief shudder a pickaxe hit gives the deposit.

Fields

SharedENT.ColorSource ☍

Tint applied over the whole model, or false for none.

SharedENT.IsMiningDepositSource ☍
ClientENT.lightSource ☍
ClientENT.lightExpiresSource ☍
ClientENT.lightOffsetSource ☍
SharedENT.MetallicSource ☍

Whether hits spark and ring like metal.

ServerENT.OriginalPosSource ☍
ServerENT.RemovedByMiningSource ☍
ClientENT.shudderStartSource ☍
ClientENT.sinkFromZSource ☍

Start from wherever the last ease had got to, so quick swings don't jump.

ClientENT.sinkStartSource ☍
ClientENT.sinkTargetZSource ☍