From 7e63932c8ebe6d4889cc66ecd57e41fcc543fe9f Mon Sep 17 00:00:00 2001 From: mattsc Date: Mon, 3 Sep 2018 14:48:10 -0700 Subject: [PATCH] Lua AIs: remove commented-out debug code (cherry-picked from commit 23f35546fc31c6345acc24624039f16a92bbb8b7) --- data/ai/lua/ai_helper.lua | 1 - data/ai/lua/generic_recruit_engine.lua | 1 - data/campaigns/Eastern_Invasion/ai/ca_ogres_flee.lua | 7 ------- 3 files changed, 9 deletions(-) diff --git a/data/ai/lua/ai_helper.lua b/data/ai/lua/ai_helper.lua index 172d89045728..6a53305e6ab9 100644 --- a/data/ai/lua/ai_helper.lua +++ b/data/ai/lua/ai_helper.lua @@ -1523,7 +1523,6 @@ function ai_helper.movefull_outofway_stopunit(ai, unit, x, y, cfg) if unit_in_way and (unit_in_way ~= unit) and ai_helper.is_visible_unit(viewing_side, unit_in_way) then - --W.message { speaker = 'narrator', message = 'Moving out of way' } ai_helper.move_unit_out_of_way(ai, unit_in_way, cfg) end end diff --git a/data/ai/lua/generic_recruit_engine.lua b/data/ai/lua/generic_recruit_engine.lua index fd6529cdb9dd..884949a7506d 100644 --- a/data/ai/lua/generic_recruit_engine.lua +++ b/data/ai/lua/generic_recruit_engine.lua @@ -688,7 +688,6 @@ return { if recruit_data.castle.loose_gold_limit >= recruit_data.recruit.cheapest_unit_cost then gold_limit = recruit_data.castle.loose_gold_limit end - --print (recruit_data.castle.loose_gold_limit .. " " .. recruit_data.recruit.cheapest_unit_cost .. " " .. gold_limit) local recruitable_units = {} diff --git a/data/campaigns/Eastern_Invasion/ai/ca_ogres_flee.lua b/data/campaigns/Eastern_Invasion/ai/ca_ogres_flee.lua index 474b37b185e6..df749ff6307e 100644 --- a/data/campaigns/Eastern_Invasion/ai/ca_ogres_flee.lua +++ b/data/campaigns/Eastern_Invasion/ai/ca_ogres_flee.lua @@ -32,9 +32,6 @@ function ca_ogres_flee:execution() local max_rating, best_hex, best_unit = - math.huge for i,u in ipairs(units) do local reach = wesnoth.find_reach(u) - - --local rating_map = LS.create() - for j,r in ipairs(reach) do local unit_in_way = wesnoth.get_unit(r[1], r[2]) @@ -74,8 +71,6 @@ function ca_ogres_flee:execution() rating = rating + own_unit_rating * own_unit_weight - --rating_map:insert(r[1], r[2], rating) - if (rating > max_rating) then best_hex = { r[1], r[2] } best_unit = u @@ -83,8 +78,6 @@ function ca_ogres_flee:execution() end end end - - --AH.put_labels(rating_map) end if best_hex then