core.plugins.maintenance.entities.cityrp_rockfall.shared
Name: "Rockfall Entity". Product: "CityRP 2 (Roleplay)". Description: A rockfall that needs to be cleaned up by a maintenance worker with a shovel.
- SharedENT:BeginRise(finalPos)Source ☍
-
Begin rising from underground to its final resting position.
Parameters
- finalPosVectorThe resting position the rockfall should end up at.
- SharedENT:CleanUp(ply)Source ☍
-
Clean up this rockfall and reward the player.
Parameters
- plyPlayerThe player cleaning up the rockfall
- SharedENT:GetRiseDepth() → numberSource ☍
-
Returns how far underground the rockfall should start, based on the model's height.
Returns
- number
- SharedENT:IsRising() → booleanSource ☍
-
@return
rising— Whether the rockfall is still emerging and not yet fixable.Returns
- booleanWhether the rockfall is still emerging and not yet fixable.
- SharedENT:MoveTo(pos)Source ☍
-
Moves the physics object directly, since Entity:SetPos() alone won't drag it along.
Parameters
- posVector
- SharedENT:SpawnFunction(ply, tr, className) → Entity?Source ☍
-
Spawns a rockfall from the entity menu at the aimed-at surface.
Parameters
- plyPlayerThe spawning player.
- trtableEye trace of the spawn attempt.
- classNamestringClass being spawned.
Returns
- SharedENT:Think()Source ☍
-
Advances the rise animation, clearing the rising flag once it lands.