From 1447dbfef282fde78a84498fb7133b91d2099527 Mon Sep 17 00:00:00 2001 From: marco_a <4279489-marco_a@users.noreply.gitlab.com> Date: Tue, 9 Apr 2024 22:20:06 +0200 Subject: [PATCH] DOCS: expose `apply_damage` function --- DOCS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DOCS.md b/DOCS.md index b96a398..e145a68 100644 --- a/DOCS.md +++ b/DOCS.md @@ -112,6 +112,9 @@ Weapons communicate their state through players metadata: * `weapons_lib.refill(p_name, weapon)`: instantly refills the magazine of `weapon` for `p_name`. If the weapon was reloading, it instantly completes the process * `weapons_lib.deactivate_zoom(p_name)`: disables the zoom state of the player, if any * `weapons_lib.reset_state(player)`: resets the weapon state of `player`, instantly completing any ongoing action +* `weapons_lib.apply_damage(hitter, targets, weapon, action)`: useful for `"custom"` actions to deal damage + * `targets` is a table of tables, one per target hit. Format of these single tables is `{object = ObjRef, hit_point = intersection_point}`. `hit_point` is optional + * `weapon` is the node representing the weapon ## Getters * `weapons_lib.get_weapon_by_name(w_name)`: returns the table of the weapon `w_name`, if any