26 {
28 if (Barrel_ColorBase.Cast(target_item) && !target_item.IsOpen())
29 return false;
30
31 if ( target_item && item && Liquid.CanFillContainer( item, target_item.GetLiquidType(),
true ) && Liquid.CanFillContainer( target_item, item.GetLiquidType(),
true ) && !
GetGame().IsInventoryOpen() )
32 {
33 if ( target_item.GetQuantity() > target_item.GetQuantityMin() && item.GetQuantity() < item.GetQuantityMax() && !player.GetLiquidTendencyDrain() && Liquid.CanFillContainer( item, target_item.GetLiquidType() ) )
34 {
35 if ( Liquid.CanFillContainer( target_item, item.GetLiquidType() ) )
36 {
38 return true;
39 }
40 else
41 {
42 player.SetLiquidTendencyDrain(true);
43 return false;
44 }
45 }
46 if ( item.GetQuantity() > item.GetQuantityMin() && target_item.GetQuantity() < target_item.GetQuantityMax() && player.GetLiquidTendencyDrain() && Liquid.CanFillContainer( target_item, item.GetLiquidType() ) )
47 {
48 if ( Liquid.CanFillContainer( item, target_item.GetLiquidType() ) )
49 {
51 return true;
52 }
53 else
54 {
55 player.SetLiquidTendencyDrain(false);
56 return false;
57 }
58 }
59 }
60 return false;
61 }
class GP5GasMask extends MaskBase ItemBase
proto native CGame GetGame()