Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow reading fun books even when morale is low #79

Merged
merged 1 commit into from
Feb 20, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4520,10 +4520,6 @@ void player::read(game *g, char ch)
g->add_msg("It's bad idea to read while driving.");
return;
}
if (morale_level() < MIN_MORALE_READ) { // See morale.h
g->add_msg("What's the point of reading? (Your morale is too low!)");
return;
}
// Check if reading is okay
if (g->light_level() < 8 && LL_LIT > g->lm.at(0, 0)) {
g->add_msg("It's too dark to read!");
Expand Down Expand Up @@ -4590,8 +4586,10 @@ int time; //Declare this here so that we can change the time depending on whats
activity = player_activity(ACT_READ, time, index);
moves = 0;
return;
}
else if (skillLevel(tmp->type) >= tmp->level && tmp->fun <= 0 &&
} else if (morale_level() < MIN_MORALE_READ && tmp->fun <= 0) { // See morale.h
g->add_msg("What's the point of reading? (Your morale is too low!)");
return;
} else if (skillLevel(tmp->type) >= tmp->level && tmp->fun <= 0 &&
!query_yn("Your %s skill won't be improved. Read anyway?",
tmp->type->name().c_str()))
return;
Expand Down