Commit ebd86200 authored by Jason Rhinelander's avatar Jason Rhinelander

cost_unit was *added* instead of *subtracted*

This seems like a pretty major bug: it means utility results are higher
than they should be.  This shouldn't affect beliefs, however: profit
beliefs subtract unit costs appropriately.

Bump version with fix to 1.1.1.
parent 65b3e618
......@@ -5,7 +5,7 @@ project(creativity CXX)
# Creativity package version
set(creativity_author "Jason Rhinelander <>")
......@@ -501,7 +501,7 @@ const std::unordered_map<SharedMember<Book>, BookCopy>& Reader::library() const
void Reader::receiveProceeds(const SharedMember<Book> &book, const Bundle &revenue) {
assets() += revenue;
Bundle tvc(creativity_->money, book->currSales() * cost_unit);
Bundle tvc(creativity_->money, book->currSales() * -cost_unit);
tvc.transferApprox(tvc, assets(), 1e-8);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment