Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
sv_resources.qh
Go to the documentation of this file.
1#pragma once
2
7
9
10// TODO: split resources into their own files, registry based
37
38// ============================ Public API ====================================
39
44float GetResourceLimit(entity e, Resource res_type);
45
50float GetResource(entity e, Resource res_type);
51
57bool SetResourceExplicit(entity e, Resource res_type, float amount);
58
65void SetResource(entity e, Resource res_type, float amount);
66
72void GiveResource(entity receiver, Resource res_type, float amount);
73
80void GiveResourceWithLimit(entity receiver, Resource res_type, float amount, float limit);
81
87void TakeResource(entity receiver, Resource res_type, float amount);
88
95void TakeResourceWithLimit(entity receiver, Resource res_type, float amount, float limit);
96
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void TakeResourceWithLimit(entity receiver, Resource res_type, float amount, float limit)
Takes an entity some resource but not less than a limit.
void SetResource(entity e, Resource res_type, float amount)
Sets the current amount of resource the given entity will have but limited to the max amount allowed ...
float autocvar_g_balance_armor_rotlinear
float autocvar_g_balance_pause_fuel_regen
float autocvar_g_balance_fuel_limit
int autocvar_g_balance_fuel_rotstable
float autocvar_g_balance_fuel_regen
float autocvar_g_balance_armor_regen
int autocvar_g_balance_armor_limit
float autocvar_g_balance_fuel_regenlinear
float autocvar_g_balance_health_rotstable
float autocvar_g_balance_health_regenstable
void GiveResource(entity receiver, Resource res_type, float amount)
Gives an entity some resource.
int autocvar_g_balance_armor_regenstable
float autocvar_g_balance_health_rotlinear
float autocvar_g_balance_pause_armor_rot
float autocvar_g_balance_health_regenlinear
float autocvar_g_balance_fuel_rotlinear
float autocvar_g_balance_pause_health_rot
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
void TakeResource(entity receiver, Resource res_type, float amount)
Takes an entity some resource.
int autocvar_g_balance_fuel_regenstable
float autocvar_g_balance_armor_rot
float autocvar_g_balance_health_regen
float autocvar_g_balance_pause_health_regen
int autocvar_g_balance_armor_rotstable
float GetResourceLimit(entity e, Resource res_type)
Returns the maximum amount of the given resource.
float autocvar_g_balance_health_rot
int GetAmmoConsumption(entity wpn)
Returns ammo consumed per shot by the primary/default fire mode.
float autocvar_g_balance_health_limit
float autocvar_g_balance_pause_fuel_rot
float autocvar_g_balance_fuel_rot
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
float autocvar_g_balance_armor_regenlinear
void GiveResourceWithLimit(entity receiver, Resource res_type, float amount, float limit)
Gives an entity some resource but not more than a limit.