Skip to content

Commit

Permalink
Rename files and simplify descriptions (FAForever#5361)
Browse files Browse the repository at this point in the history
  • Loading branch information
Garanas authored Aug 26, 2023
1 parent 9da970e commit 62df759
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 44 deletions.
6 changes: 3 additions & 3 deletions lua/SimCallbacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ do
return
end

import("/lua/sim/commands/orders-distribute.lua").DistributeOrders(selection, target, data.ClearCommands or false, true)
import("/lua/sim/commands/distribute-queue.lua").DistributeOrders(selection, target, data.ClearCommands or false, true)
end
end

Expand All @@ -421,7 +421,7 @@ do
return
end

import("/lua/sim/commands/orders-copy.lua").CopyOrders(selection, target, data.ClearCommands or false, true)
import("/lua/sim/commands/copy-queue.lua").CopyOrders(selection, target, data.ClearCommands or false, true)
end
end

Expand All @@ -438,7 +438,7 @@ do

local transports = EntityCategoryFilterDown(categories.TRANSPORTATION, selection)
local transportees = EntityCategoryFilterDown(categories.ALLUNITS - (categories.AIR + categories.TRANSPORTATION), selection)
local transportedUnits, transportsUsed, remUnits, remTransports = import("/lua/sim/commands/orders-load-in-transport.lua").LoadIntoTransports(transportees, transports, data.ClearCommands or false, true)
local transportedUnits, transportsUsed, remUnits, remTransports = import("/lua/sim/commands/load-in-transport.lua").LoadIntoTransports(transportees, transports, data.ClearCommands or false, true)
end
end

Expand Down
12 changes: 1 addition & 11 deletions lua/keymap/keyactions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1630,21 +1630,11 @@ local keyActionsOrdersQueueBased = {
wikiURL = 'Play/Game/Hotkeys/OrdersQueueManipulation#distribute-orders'
},
['distribute_orders_context'] = {
action = 'UI_Lua import("/lua/keymap/misckeyactions.lua").DistributeOrdersOfMouseContext(false)',
category = 'ordersQueueBased',
wikiURL = 'Play/Game/Hotkeys/OrdersQueueManipulation#distribute-orders-context'
},
['shift_distribute_orders_context'] = {
action = 'UI_Lua import("/lua/keymap/misckeyactions.lua").DistributeOrdersOfMouseContext(false)',
category = 'ordersQueueBased',
wikiURL = 'Play/Game/Hotkeys/OrdersQueueManipulation#distribute-orders-context'
},
['distribute_orders_context_clear'] = {
action = 'UI_Lua import("/lua/keymap/misckeyactions.lua").DistributeOrdersOfMouseContext(true)',
category = 'ordersQueueBased',
wikiURL = 'Play/Game/Hotkeys/OrdersQueueManipulation#distribute-orders-context'
},
['shift_distribute_orders_context_clear'] = {
['shift_distribute_orders_context'] = {
action = 'UI_Lua import("/lua/keymap/misckeyactions.lua").DistributeOrdersOfMouseContext(true)',
category = 'ordersQueueBased',
wikiURL = 'Play/Game/Hotkeys/OrdersQueueManipulation#distribute-orders-context'
Expand Down
32 changes: 15 additions & 17 deletions lua/keymap/keydescriptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -526,21 +526,19 @@ keyDescriptions = {
['toggle_ai_nav_retreat_direction_from'] = 'NavUtils - Toggle to visualize output of RetreatDirectionFrom ',
['toggle_ai_nav_direction_to'] = 'NavUtils - Toggle to visualize output of DirectionTo',

['filter_highest_engineer_and_assist'] = '<LOC key_desc_filter_highest_engineer_and_assist>Filter the selection to the most advanced engineer, all other engineers assist that engineer',
['shift_filter_highest_engineer_and_assist'] = '<LOC key_desc_shift_filter_highest_engineer_and_assist>Filter the selection to the most advanced engineer, all other engineers assist that engineer',
['distribute_orders'] = '<LOC key_desc_distribute_orders>Distribute the command queue of the unit in your selection that is nearest to the mouse',
['shift_distribute_orders'] = '<LOC key_desc_shift_distribute_orders>Distribute the command queue of the unit in your selection that is nearest to the mouse',
['distribute_orders_context'] = '<LOC key_desc_distribute_orders>Distribute the command queue of the unit that the mouse is hovering over',
['shift_distribute_orders_context'] = '<LOC key_desc_shift_distribute_orders>Distribute the command queue of the unit that the mouse is hovering over',
['distribute_orders_context_clear'] = '<LOC key_desc_distribute_orders_context_clear>Distribute the command queue of the unit that the mouse is hovering over. Applies immediately',
['shift_distribute_orders_context_clear'] = '<LOC key_desc_shift_distribute_orders_context_clear>Distribute the command queue of the unit that the mouse is hovering over. Applies immediately',
['cycle_context_based_templates'] = '<LOC key_desc_context_based_templates>Cycle templates based on the unit that the mouse is hovering over',
['shift_cycle_context_based_templates'] = '<LOC key_desc_shift_context_based_templates>Cycle templates based on the unit that the mouse is hovering over',

['load_transports'] = '<LOC key_desc_load_transports>Load the selected units into the selected transports',
['load_transports_clear'] = '<LOC key_desc_load_transports_clear>Load the selected units into the selected transports. Applies immediately',
['shift_load_transports'] = '<LOC key_desc_shift_load_transports>Load the selected units into the selected transports',
['shift_load_transports_clear'] = '<LOC key_desc_shift_load_transports_clear>Load the selected units into the selected transports. Applies immediately',
['copy_orders'] = '<LOC key_desc_copy_orders>Apply the command queue of the unit that the mouse is hovering over to your selection',
['shift_copy_orders'] = '<LOC key_desc_shift_copy_orders>Apply the command queue of the unit that the mouse is hovering over to your selection',
['filter_highest_engineer_and_assist'] = '<LOC key_desc_filter_highest_engineer_and_assist>Filter engineers',
['shift_filter_highest_engineer_and_assist'] = '<LOC key_desc_shift_filter_highest_engineer_and_assist>Filter engineers',
['distribute_orders'] = '<LOC key_desc_distribute_orders>Distribute orders',
['shift_distribute_orders'] = '<LOC key_desc_shift_distribute_orders>Distribute orders',
['distribute_orders_context'] = '<LOC key_desc_distribute_orders>Distribute orders from the unit beneath the mouse cursor',
['shift_distribute_orders_context'] = '<LOC key_desc_shift_distribute_orders>Distribute orders from the unit beneath the mouse cursor',
['cycle_context_based_templates'] = '<LOC key_desc_context_based_templates>Cycle templates',
['shift_cycle_context_based_templates'] = '<LOC key_desc_shift_context_based_templates>Cycle templates',

['load_transports'] = '<LOC key_desc_load_transports>Load into transports',
['load_transports_clear'] = '<LOC key_desc_load_transports_clear>Load into transports. Applies immediately',
['shift_load_transports'] = '<LOC key_desc_shift_load_transports>Load into transports',
['shift_load_transports_clear'] = '<LOC key_desc_shift_load_transports_clear>Load into transports. Applies immediately',
['copy_orders'] = '<LOC key_desc_copy_orders>Copy orders of the unit the mouse is on top of',
['shift_copy_orders'] = '<LOC key_desc_shift_copy_orders>Copy orders of the unit the mouse is on top of',
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
--** SOFTWARE.
--******************************************************************************************************

local UnitQueueDataToCommand = import("/lua/sim/commands/orders-shared.lua").UnitQueueDataToCommand
local PopulateLocation = import("/lua/sim/commands/orders-shared.lua").PopulateLocation
local UnitQueueDataToCommand = import("/lua/sim/commands/shared.lua").UnitQueueDataToCommand
local PopulateLocation = import("/lua/sim/commands/shared.lua").PopulateLocation

---@type table
local dummyEmptyTable = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,16 @@
-- upvalue scope for performance
local TableGetn = table.getn
local TableInsert = table.insert
local TableSort = table.sort

local MathMod = math.mod
local MathMin = math.min

local UnitQueueDataToCommand = import("/lua/sim/commands/orders-shared.lua").UnitQueueDataToCommand
local ComputeBatchCounts = import("/lua/sim/commands/orders-shared.lua").ComputeBatchCounts
local PopulateBatch = import("/lua/sim/commands/orders-shared.lua").PopulateBatch
local PopulateLocation = import("/lua/sim/commands/orders-shared.lua").PopulateLocation
local SortUnitsByDistanceToPoint = import("/lua/sim/commands/orders-shared.lua").SortUnitsByDistanceToPoint
local LoadIntoTransports = import("/lua/sim/commands/orders-load-in-transport.lua").LoadIntoTransports
local UnitQueueDataToCommand = import("/lua/sim/commands/shared.lua").UnitQueueDataToCommand
local ComputeBatchCounts = import("/lua/sim/commands/shared.lua").ComputeBatchCounts
local PopulateBatch = import("/lua/sim/commands/shared.lua").PopulateBatch
local PopulateLocation = import("/lua/sim/commands/shared.lua").PopulateLocation
local SortUnitsByDistanceToPoint = import("/lua/sim/commands/shared.lua").SortUnitsByDistanceToPoint
local LoadIntoTransports = import("/lua/sim/commands/load-in-transport.lua").LoadIntoTransports


--- Processes the orders and re-distributes them over the units. Assumes that all units in the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
--** SOFTWARE.
--******************************************************************************************************

local AveragePositionOfUnitsXZ = import("/lua/sim/commands/orders-shared.lua").AveragePositionOfUnitsXZ
local AveragePositionOfUnits = import("/lua/sim/commands/orders-shared.lua").AveragePositionOfUnits
local SortUnitsByDistanceToPoint = import("/lua/sim/commands/orders-shared.lua").SortUnitsByDistanceToPoint
local PointOnUnitCircle = import("/lua/sim/commands/orders-shared.lua").PointOnUnitCircle
local AveragePositionOfUnitsXZ = import("/lua/sim/commands/shared.lua").AveragePositionOfUnitsXZ
local AveragePositionOfUnits = import("/lua/sim/commands/shared.lua").AveragePositionOfUnits
local SortUnitsByDistanceToPoint = import("/lua/sim/commands/shared.lua").SortUnitsByDistanceToPoint
local PointOnUnitCircle = import("/lua/sim/commands/shared.lua").PointOnUnitCircle

---@param unit Unit
---@return number # small slots
Expand Down
File renamed without changes.

0 comments on commit 62df759

Please sign in to comment.