Skip to content

Commit

Permalink
compoundBag.giveCompound now cant give over that compoundBagComponent…
Browse files Browse the repository at this point in the history
…s max storage space.
  • Loading branch information
Untrustedlife authored and hhyyrylainen committed Mar 15, 2019
1 parent 361d2f5 commit 37f7f9b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/microbe_stage/process_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 37f7f9b

Please sign in to comment.