Skip to content

Commit

Permalink
Do not load helper.lua where it is not used any more
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsc committed May 13, 2018
1 parent 0396461 commit c9ef14a
Show file tree
Hide file tree
Showing 38 changed files with 0 additions and 44 deletions.
1 change: 0 additions & 1 deletion data/ai/lua/generic_recruit_engine.lua
Expand Up @@ -23,7 +23,6 @@ return {
end
math.randomseed(os.time())

local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local LS = wesnoth.require "location_set"
local M = wesnoth.map
Expand Down
1 change: 0 additions & 1 deletion data/ai/lua/generic_rush_engine.lua
Expand Up @@ -6,7 +6,6 @@ return {

-- More generic grunt rush (and can, in fact, be used with other unit types as well)

local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local BC = wesnoth.require "ai/lua/battle_calcs.lua"
local LS = wesnoth.require "location_set"
Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_fast_attack_utils.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local LS = wesnoth.require "location_set"
local T = wml.tag
Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_fast_combat.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local FAU = wesnoth.require "ai/micro_ais/cas/ca_fast_attack_utils.lua"
local LS = wesnoth.require "location_set"
Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_forest_animals_move.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local LS = wesnoth.require "location_set"
local M = wesnoth.map
Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_forest_animals_new_rabbit.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local T = wml.tag

Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_hang_out.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local LS = wesnoth.require "location_set"
local MAIUV = wesnoth.require "ai/micro_ais/micro_ai_unit_variables.lua"
Expand Down
2 changes: 0 additions & 2 deletions data/ai/micro_ais/cas/ca_healer_initialize.lua
@@ -1,5 +1,3 @@
local H = wesnoth.require "helper"

local ca_healer_initialize = {}

function ca_healer_initialize:evaluation()
Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_healer_move.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local LS = wesnoth.require "location_set"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local BC = wesnoth.require "ai/lua/battle_calcs.lua"
Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_herding_attack_close_enemy.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local M = wesnoth.map

Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_herding_dog_move.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local LS = wesnoth.require "location_set"
local M = wesnoth.map
Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_herding_dog_stopmove.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"

local function get_dog(cfg)
Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_herding_herd_sheep.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local M = wesnoth.map

Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_herding_sheep_runs_dog.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local M = wesnoth.map

Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_herding_sheep_runs_enemy.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local M = wesnoth.map

Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_lurkers.lua
@@ -1,6 +1,5 @@
local LS = wesnoth.require "location_set"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local H = wesnoth.require "helper"

local function get_lurker(cfg)
-- We simply pick the first of the lurkers, they have no strategy
Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_messenger_escort_move.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local LS = wesnoth.require "location_set"
local MAIUV = wesnoth.require "ai/micro_ais/micro_ai_unit_variables.lua"
Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_messenger_f_next_waypoint.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local MAIUV = wesnoth.require "ai/micro_ais/micro_ai_unit_variables.lua"

Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_patrol.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local MAIUV = wesnoth.require "ai/micro_ais/micro_ai_unit_variables.lua"

Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_protect_unit_attack.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local BC = wesnoth.require "ai/lua/battle_calcs.lua"

Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_protect_unit_finish.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"

local ca_protect_unit_finish, PU_unit, PU_goal = {}
Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_protect_unit_move.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local LS = wesnoth.require "location_set"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local BC = wesnoth.require "ai/lua/battle_calcs.lua"
Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_return_guardian.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"

local function get_guardian(cfg)
Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_simple_attack.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local BC = wesnoth.require "ai/lua/battle_calcs.lua"
local LS = wesnoth.require "location_set"
Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_wolves_move.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local BC = wesnoth.require "ai/lua/battle_calcs.lua"
local M = wesnoth.map
Expand Down
1 change: 0 additions & 1 deletion data/ai/micro_ais/cas/ca_wolves_wander.lua
@@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local BC = wesnoth.require "ai/lua/battle_calcs.lua"
local LS = wesnoth.require "location_set"
Expand Down
2 changes: 0 additions & 2 deletions data/ai/micro_ais/mai-defs/fast.lua
@@ -1,5 +1,3 @@
local H = wesnoth.require "helper"

function wesnoth.micro_ais.fast_ai(cfg)
local optional_keys = {
"attack_hidden_enemies", "[avoid]", "dungeon_mode",
Expand Down
2 changes: 0 additions & 2 deletions data/ai/micro_ais/mai-defs/recruiting.lua
@@ -1,5 +1,3 @@
local H = wesnoth.require "helper"

local function handle_default_recruitment(cfg)
-- Also need to delete/add the default recruitment CA
if cfg.action == 'add' then
Expand Down
2 changes: 0 additions & 2 deletions data/ai/micro_ais/micro_ai_self_data.lua
Expand Up @@ -13,8 +13,6 @@
-- same side).
-- For the time being, we only allow key=value style variables.

local H = wesnoth.require "helper"

local micro_ai_self_data = {}

function micro_ai_self_data.modify_mai_self_data(self_data, ai_id, action, vars_table)
Expand Down
2 changes: 0 additions & 2 deletions data/ai/micro_ais/micro_ai_unit_variables.lua
Expand Up @@ -9,8 +9,6 @@
-- with different ai_CA values affecting the same unit)
-- For the time being, we only allow key=value style variables.

local H = wesnoth.require "helper"

local micro_ai_unit_variables = {}

function micro_ai_unit_variables.modify_mai_unit_variables(unit, ai_id, action, vars_table)
Expand Down
1 change: 0 additions & 1 deletion data/ai/scenarios/scenario-AI_Arena_small.cfg
Expand Up @@ -21,7 +21,6 @@
first_time_only=no
[lua]
code = <<
H = wesnoth.dofile("lua/helper.lua")
local tests_table = {}
function register_test(_name, _description)
tests_table[_name] = _description
Expand Down
Expand Up @@ -654,7 +654,6 @@
# wmllint: markcheck off
code= <<
local ai_helper = wesnoth.require "ai/lua/ai_helper.lua"
local H = wesnoth.require "helper"
local delf = wesnoth.get_units { id = 'Delfador' }[1]
local sceptre_loc= wesnoth.special_locations.sceptre
local path = wesnoth.find_path(delf, sceptre_loc[1], sceptre_loc[2], {ignore_units = true, viewing_side = 0}) -- # wmllint: noconvert
Expand Down
1 change: 0 additions & 1 deletion data/campaigns/Legend_of_Wesmere/lua/wml_tags.lua
Expand Up @@ -4,7 +4,6 @@ local labels = {}
local wml_label = wesnoth.wml_actions.label
local replace_map = wesnoth.wml_actions.replace_map

local helper = wesnoth.require "helper"
local wml_actions = wesnoth.wml_actions
local T = wml.tag
local vars = wml.variables
Expand Down
1 change: 0 additions & 1 deletion data/campaigns/tutorial/lua/character_selection.lua
Expand Up @@ -3,7 +3,6 @@
-- Allows the player to choose whether they want to play Konrad or Li’sar
-- for the tutorial

local helper = wesnoth.require "helper"
local T = wml.tag
local wml_actions = wesnoth.wml_actions
local _ = wesnoth.textdomain "wesnoth-tutorial"
Expand Down
1 change: 0 additions & 1 deletion data/scenario-test.cfg
Expand Up @@ -3669,7 +3669,6 @@ unplagueable: $wml_unit.status.unplagueable"

[lua]
code = <<
local helper = wesnoth.require "helper"
for i, v in ipairs(wml.array_access.get_proxy("temp_villages_area")) do
wesnoth.put_unit({ type = "Goblin Spearman", side = 2 }, v.x, v.y)
end
Expand Down
1 change: 0 additions & 1 deletion data/test/scenarios/ai/_main.cfg
Expand Up @@ -12,7 +12,6 @@

#define ASPECT_NOTIFICATION
<<
local H = wesnoth.require('helper')
local expected = wml.array_access.get('expected')
local aspect = wml.variables['test_attribute']
if ai.aspects[aspect] ~= expected[wesnoth.current.turn].value then
Expand Down
1 change: 0 additions & 1 deletion data/test/scenarios/interrupts.cfg
Expand Up @@ -76,7 +76,6 @@
name=start
[lua]
code=<<
local H = wesnoth.require "helper"
local function continue()
wesnoth.wml_actions.continue{}
end
Expand Down
2 changes: 0 additions & 2 deletions join.lua
Expand Up @@ -11,8 +11,6 @@ local function plugin()

local events, context, info

local helper = wesnoth.require "helper"

local function find_test_game(info)
local g = info.game_list()
if g then
Expand Down

0 comments on commit c9ef14a

Please sign in to comment.