Xonotic
|
Header file that describes the resource system. More...
#include <common/resources/resources.qh>
Go to the source code of this file.
Functions | |
float | GetResource (entity e, Resource res_type) |
Returns the current amount of resource the given entity has. More... | |
void | SetResource (entity e, Resource res_type, float amount) |
Sets the current amount of resource the given entity will have. More... | |
bool | SetResourceExplicit (entity e, Resource res_type, float amount) |
Sets the resource amount of an entity without calling any hooks. More... | |
void | TakeResource (entity receiver, Resource res_type, float amount) |
Takes an entity some resource. More... | |
void | TakeResourceWithLimit (entity receiver, Resource res_type, float amount, float limit) |
Takes an entity some resource but not less than a limit. More... | |
Header file that describes the resource system.
Definition in file cl_resources.qh.
Returns the current amount of resource the given entity has.
[in] | e | Entity to check. |
[in] | res_type | Type of the resource (a RES_* constant). |
Definition at line 10 of file cl_resources.qc.
Sets the current amount of resource the given entity will have.
[in,out] | e | Entity to adjust. |
[in] | res_type | Type of the resource (a RES_* constant). |
[in] | amount | Amount of resource to set. |
Definition at line 26 of file cl_resources.qc.
Sets the resource amount of an entity without calling any hooks.
[in,out] | e | Entity to adjust. |
[in] | res_type | Type of the resource (a RES_* constant). |
[in] | amount | Amount of resource to set. |
Definition at line 15 of file cl_resources.qc.
Takes an entity some resource.
[in,out] | receiver | Entity to take resource from. |
[in] | res_type | Type of the resource (a RES_* constant). |
[in] | amount | Amount of resource to take. |
Definition at line 31 of file cl_resources.qc.
Takes an entity some resource but not less than a limit.
[in,out] | receiver | Entity to take resource from. |
[in] | res_type | Type of the resource (a RES_* constant). |
[in] | amount | Amount of resource to take. |
[in] | limit | Limit of resources to take. |
Definition at line 40 of file cl_resources.qc.