From 37f7f9b3a2fc902f2c114a2e0b74cabd1a33aaa0 Mon Sep 17 00:00:00 2001 From: Untrustedlife Date: Wed, 20 Feb 2019 18:42:19 -0600 Subject: [PATCH] compoundBag.giveCompound now cant give over that compoundBagComponents max storage space. --- src/microbe_stage/process_system.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/microbe_stage/process_system.cpp b/src/microbe_stage/process_system.cpp index 0a02873acbe..caa1abd7753 100644 --- a/src/microbe_stage/process_system.cpp +++ b/src/microbe_stage/process_system.cpp @@ -101,7 +101,11 @@ double void CompoundBagComponent::giveCompound(CompoundId id, double amt) { + compounds[id].amount += amt; + if(compounds[id].amount > storageSpace) { + compounds[id].amount = storageSpace; + } } void