cityrp.healaudit
Audit log for healing under fire.
The baseline the combat healing initiative (#1705) is measured against: how long after another
player's hit each heal or steroid is used, and how much a hit leaves pending when it stops a heal
over time. Both land in cityrp.logs, and the saved query in
docs/design/combat-healing/heal-under-fire-baseline.md reads them back per day.
- Servercityrp.healaudit.Clear(ply)Source ☍
-
Forgets the player's last hit, so the next heal reads as having none this life.
Parameters
- plyPlayerThe player to clear.
- Servercityrp.healaudit.LogCancelled(ply, attacker)Source ☍
-
Logs a heal over time that damage is about to stop as
healcancel, if one is running with HP still to give: the HP pending, the attacker type (player,selforother) and its class. Call it before removing theplayerhealingtimer, since the timer is how it knows.Parameters
- Servercityrp.healaudit.LogUse(ply, item, amount)Source ☍
-
Logs a heal or steroid use as
healuse: the item, the seconds since the last hit (blank if none this life), the HP the item adds (0 for steroids) and the player's health when they used it.Parameters
- plyPlayerThe player who used it.
- itemstringThe item's unique ID.
- amountnumberThe HP the item adds.
- Servercityrp.healaudit.RecordHit(victim, attacker)Source ☍
-
Records that
attackerjust damagedvictim, if the attacker is another player.Parameters
- Servercityrp.healaudit.SinceLastHit(ply) → number?Source ☍
-
The seconds since another player last damaged
plythis life.Parameters
- plyPlayerThe player to check.
Returns
- number?The seconds since the hit, or nil if there has been none.
- Servercityrp.healauditSource ☍