From b97bc7abc79c1a545104a60dc2985e663f001b57 Mon Sep 17 00:00:00 2001 From: daftfad Date: Fri, 25 Jan 2013 19:05:22 -0500 Subject: [PATCH 1/2] added check to npc_move_to_next to use debugmon toggle --- npcmove.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/npcmove.cpp b/npcmove.cpp index f3770cf91d24f..a488356064d35 100644 --- a/npcmove.cpp +++ b/npcmove.cpp @@ -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; } From e6478eff42c755077869cf455c9da7a992bc0032 Mon Sep 17 00:00:00 2001 From: daftfad Date: Mon, 28 Jan 2013 22:42:32 -0500 Subject: [PATCH 2/2] fixed toolless constructions --- construction.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/construction.cpp b/construction.cpp index 0a2aee0df7650..6d00e71508f24 100644 --- a/construction.cpp +++ b/construction.cpp @@ -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; }