]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/resources.qh
Implement TakeResource
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / resources.qh
index 196ccf05dbaa1c87b150edddcea48b6ec100a2a2..6d4f46ed2f44143acef17fcf3fc3a4452befe36a 100644 (file)
@@ -28,6 +28,22 @@ bool SetResourceAmountExplicit(entity e, int resource_type, float amount);
 /// \return No return.
 void SetResourceAmount(entity e, int resource_type, float amount);
 
+/// \brief Takes an entity some resource.
+/// \param[in,out] receiver Entity to take resource from.
+/// \param[in] resource_type Type of the resource (a RESOURCE_* constant).
+/// \param[in] amount Amount of resource to take.
+/// \return No return.
+void TakeResource(entity receiver, int resource_type, float amount);
+
+/// \brief Takes an entity some resource but not less than a limit.
+/// \param[in,out] receiver Entity to take resource from.
+/// \param[in] resource_type Type of the resource (a RESOURCE_* constant).
+/// \param[in] amount Amount of resource to take.
+/// \param[in] limit Limit of resources to take.
+/// \return No return.
+void TakeResourceWithLimit(entity receiver, int resource_type, float amount,
+       float limit);
+
 // ===================== Legacy and/or internal API ===========================
 
 /// \brief Converts an entity field to resource type.