void ENTITY:CancelUse( boolean callOnUseCancel = false )
Resets the entity to its initial state with no user or progress.
Supplying a true value to this function will call the entity's OnUseCancel hook.
boolean ENTITY:GetDrawKeyPrompt()
Returns whether an image of the E key should show on-screen when this entity is usable by the player.
If unset, this defaults to true.
boolean ENTITY:GetDrawProgress()
Returns whether a ring should show on-screen indicating the player's progress while using this entity.
If unset, this defaults to true.
number ENTITY:GetEndTime()
Returns when the entity will be done being used.
This will return 0 if the entity is not currently being used.
Entity ENTITY:GetUser()
Returns the entity (typically a player) that is currently using this entity.
This will return nil if the entity is not currently being used.
boolean ENTITY:IsProgressUsable()
Returns true for the base and all derived entities.
WARNING: Do not override this function.
void ENTITY:SetDrawKeyPrompt( boolean shouldDraw )
Sets whether an image of the E key should show on-screen when this entity is usable by the player.
If unset, this defaults to true.
void ENTITY:SetDrawProgress( boolean shouldDraw )
Sets whether a ring should show on-screen indicating the player's progress while using this entity.
If unset, this defaults to true.
void ENTITY:SetEndTime( number time )
Sets when the entity will be done being used.
WARNING: You probably shouldn't use this unless you know what you're doing.
void ENTITY:SetUser( Entity user )
Sets the entity (typically a player) that is currently using this entity.
WARNING: You probably shouldn't use this unless you know what you're doing.
void ENTITY:OnUseCancel( Player user )
Called when the player lets go of their use key while they've been using the entity.
INFO: You should include this in your entity, even if it's empty.
void ENTITY:OnUseFinish( Player user )
Called when this entity is finished being used, i.e. TimeToUse seconds after the user starts holding their use key.
INFO: You should include this in your entity, even if it's empty.
void ENTITY:OnUseStart( Player user )
Called when the player starts using this entity.
INFO: You should include this in your entity, even if it's empty.
Which step of the PartialUses table the entity will execute next.
WARNING: You probably shouldn't use this unless you know what you're doing.
A list of times and functions to be carried out while the entity is being used.
Each value in this table is a table with two values:
prog - a whole number corresponding to the percentage of progress func should be run
func - a function with one argument, ent (this entity), that is run at prog% of full use.
INFO: This table needs to be in chronological order to work properly.
Deprecated. This needs to be removed.
The time in seconds it takes to use this entity.
This must be shared for the progress ring to draw properly.