Xonotic
cl_resources.qh
Go to the documentation of this file.
1 #pragma once
2 
6 
8 
9 // ============================ Public API ====================================
10 
15 float GetResource(entity e, Resource res_type);
16 
22 bool SetResourceExplicit(entity e, Resource res_type, float amount);
23 
29 void SetResource(entity e, Resource res_type, float amount);
30 
36 void TakeResource(entity receiver, Resource res_type, float amount);
37 
44 void TakeResourceWithLimit(entity receiver, Resource res_type, float amount, float limit);
void TakeResource(entity receiver, Resource res_type, float amount)
Takes an entity some resource.
Definition: cl_resources.qc:31
entity() spawn
void TakeResourceWithLimit(entity receiver, Resource res_type, float amount, float limit)
Takes an entity some resource but not less than a limit.
Definition: cl_resources.qc:40
void SetResource(entity e, Resource res_type, float amount)
Sets the current amount of resource the given entity will have.
Definition: cl_resources.qc:26
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
Definition: cl_resources.qc:10
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
Definition: cl_resources.qc:15