From f63cc8a04702c6e9637445eb443e2116ed8f9a47 Mon Sep 17 00:00:00 2001 From: Sterling Parker Date: Thu, 17 Sep 2020 20:13:57 -0600 Subject: [PATCH] Medical: Dynamic bulk for trauma kit Kit base is 15 bulk. A standard kit fully loaded is approx 31 bulk. Supply bulks are based on partial percentages of the items that supply them. --- modules/items/traumakit/traumakit.zsc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/items/traumakit/traumakit.zsc b/modules/items/traumakit/traumakit.zsc index cf150cd4..08e5c2d4 100644 --- a/modules/items/traumakit/traumakit.zsc +++ b/modules/items/traumakit/traumakit.zsc @@ -36,7 +36,16 @@ class UaS_TraumaKit : HDWeapon { scale 0.5; tag "Trauma Kit"; } - override double weaponbulk(){ return 20; } + + override double weaponbulk(){ + double b = 0; + b += (weaponstatus[TKS_PAINKILLER] / 20) * (ENC_STIMPACK * 0.4); + b += (weaponstatus[TKS_SALINE] / 1000) * (ENC_STIMPACK * 2 * 0.8); + b += (weaponstatus[TKS_BIOFOAM] / 250) * (6 * 0.6); + b += (weaponstatus[TKS_STAPLES] / 25) * (6 * 0.1); + b = max(b, 15); + return b; + } states { spawn: