mirror of
https://github.com/weyne85/MIST.git
synced 2025-10-29 16:56:32 +00:00
Documentation Minor changes
Doc file and pdf. Minor changes to mist.lua
This commit is contained in:
parent
c50463a7c8
commit
22d5b00d49
BIN
Mist guide.pdf
BIN
Mist guide.pdf
Binary file not shown.
19
mist.lua
19
mist.lua
@ -3187,7 +3187,6 @@ mist.flagFunc.group_dead = function(vars)
|
||||
end
|
||||
|
||||
mist.flagFunc.group_alive_less_than = function(vars)
|
||||
env.info('aliveless')
|
||||
local type_tbl = {
|
||||
[{'group', 'groupname', 'gp', 'groupName'}] = 'string',
|
||||
percent = 'number',
|
||||
@ -5209,12 +5208,18 @@ mist.randomizeNumTable = function(vars)
|
||||
return newTable
|
||||
end
|
||||
|
||||
mist.randomizeGroupOrder = function(units, vars)
|
||||
mist.randomizeGroupOrder = function(passedUnits, vars)
|
||||
-- figure out what to exclude, and send data to other func
|
||||
local units = passedUnits
|
||||
|
||||
if passedUnits.units then
|
||||
units = passUnits.units
|
||||
end
|
||||
|
||||
local exclude = {}
|
||||
local excludeNum = {}
|
||||
if vars and vars.excludeName and type(vars.excludeName) == 'table' then
|
||||
exclude = vars.excludeName
|
||||
if vars and vars.excludeType and type(vars.excludeType) == 'table' then
|
||||
exclude = vars.excludeType
|
||||
end
|
||||
|
||||
if vars and vars.excludeNum and type(vars.excludeNum) == 'table' then
|
||||
@ -5241,8 +5246,8 @@ mist.randomizeGroupOrder = function(units, vars)
|
||||
if unitIndex >= low and unitIndex <= hi then -- if within range
|
||||
local found = false
|
||||
if #exclude > 0 then
|
||||
for excludeName, index in pairs(exclude) do -- check if excluded
|
||||
if mist.stringMatch(excludeName, unitData.type) then -- if excluded
|
||||
for excludeType, index in pairs(exclude) do -- check if excluded
|
||||
if mist.stringMatch(excludeType, unitData.type) then -- if excluded
|
||||
excludeNum[unitIndex] = unitIndex
|
||||
found = true
|
||||
end
|
||||
@ -5259,7 +5264,7 @@ mist.randomizeGroupOrder = function(units, vars)
|
||||
for unitIndex, unitData in pairs(units) do
|
||||
for i = 1, #newOrder do
|
||||
if newOrder[i] == unitIndex then
|
||||
newGroup[i] = mist.utils.deepCopy(units[i]) -- gets all of the unit data
|
||||
newGroup[i] = mist.utils.deepCopy(units[i]) -- gets all of the unit data
|
||||
newGroup[i].type = mist.utils.deepCopy(unitData.type)
|
||||
newGroup[i].skill = mist.utils.deepCopy(unitData.skill)
|
||||
newGroup[i].unitName = mist.utils.deepCopy(unitData.unitName)
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user