Skip to content

Commit

Permalink
Merge pull request #23 from daftfad/bugfixes
Browse files Browse the repository at this point in the history
fixed toolless constructions
  • Loading branch information
TheDarklingWolf committed Jan 29, 2013
2 parents ee33c1e + e6478ef commit 5898a2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions construction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,10 @@ bool game::player_can_build(player &p, inventory inv, constructable* con,
} // j in [0,2]
can_build_any = (has_component || !components_required) &&
(has_tool || !tools_required);
if (exact_level && (i == level) && (!has_component || !has_tool))
return false;
if (exact_level && (i == level)) {
return ((has_component || !components_required) &&
(has_tool || !tools_required));
}
} // stage[i]
return can_build_any;
}
Expand Down
3 changes: 2 additions & 1 deletion npcmove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,8 @@ void npc::move_to(game *g, int x, int y)
void npc::move_to_next(game *g)
{
if (path.empty()) {
debugmsg("npc::move_to_next() called with an empty path!");
if (g->debugmon)
debugmsg("npc::move_to_next() called with an empty path!");
move_pause();
return;
}
Expand Down

0 comments on commit 5898a2a

Please sign in to comment.