mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-13 17:08:53 +01:00
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.
This commit is contained in:
@@ -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, "<span class='warning'>The barrel is empty!</span>")
|
||||
U = null
|
||||
|
||||
Reference in New Issue
Block a user