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