From a049f83b8d09eaf245cece39c72de0faa58a7518 Mon Sep 17 00:00:00 2001 From: Alphas00 <154434082+Alphas00@users.noreply.github.com> Date: Sat, 27 Apr 2024 22:59:10 +0200 Subject: [PATCH] Barrel Tank transfer variable Added transfer_amount to the barrel tank to dynamically change the amount of of chemicals transferred from the tank to the character (this is then multiplied by 2, as per the standard barrel tank function). This variable is DIFFERENT from amount_per_transfer_from_this, as that is part of the reagent containers code and is set to 0 from the barrel tank by default. --- .../code/modules/reagents/reagent_containers/barrel_tank.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GainStation13/code/modules/reagents/reagent_containers/barrel_tank.dm b/GainStation13/code/modules/reagents/reagent_containers/barrel_tank.dm index 07a3bf74..11a6ed75 100644 --- a/GainStation13/code/modules/reagents/reagent_containers/barrel_tank.dm +++ b/GainStation13/code/modules/reagents/reagent_containers/barrel_tank.dm @@ -11,6 +11,7 @@ actions_types = list(/datum/action/item_action/toggle_tube) var/mob/living/carbon/U = null + var/transfer_amount = 1 amount_per_transfer_from_this = 0 possible_transfer_amounts = list(0) @@ -60,7 +61,7 @@ if(reagents.total_volume) var/fraction = min(1/reagents.total_volume, 1) reagents.reaction(U, INGEST, fraction, FALSE) - reagents.trans_to(U, 1, 2) + reagents.trans_to(U, transfer_amount, 2) else to_chat(U, "The barrel is empty!") U = null