get rid of mode value altogether, no longer needed
This commit is contained in:
parent
3c7457af8e
commit
39898fed1a
4 changed files with 3 additions and 9 deletions
|
@ -10,30 +10,24 @@ this.configString = string.gsub(this.modName, "%s+", "")
|
||||||
this.modes = {
|
this.modes = {
|
||||||
{
|
{
|
||||||
mode = "equippedArmour",
|
mode = "equippedArmour",
|
||||||
value = 0,
|
|
||||||
description = "Actors are pulled down by their combined armour class (Light = 1, Medium = 2, Heavy = 3) multiplied by a tenth of " ..
|
description = "Actors are pulled down by their combined armour class (Light = 1, Medium = 2, Heavy = 3) multiplied by a tenth of " ..
|
||||||
"the down-pull multiplier. Default of 100 makes it impossible to surface in all heavy armour for all but the most Athletic.",
|
"the down-pull multiplier. Default of 100 makes it impossible to surface in all heavy armour for all but the most Athletic.",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
mode = "allEquipment",
|
mode = "allEquipment",
|
||||||
value = 1,
|
|
||||||
description = "Actors are pulled down by double the weight of all equipped gear multiplied by a hundredth of the down-pull multiplier.",
|
description = "Actors are pulled down by double the weight of all equipped gear multiplied by a hundredth of the down-pull multiplier.",
|
||||||
},
|
},
|
||||||
-- keeping these in this order but with the values unchanged is terrible and I don't care
|
|
||||||
{
|
{
|
||||||
mode = "allEquipmentNecroEdit",
|
mode = "allEquipmentNecroEdit",
|
||||||
value = 3,
|
|
||||||
description = "Actors are pulled down by double the weight of all equipped gear multiplied by a hundredth of the down-pull multiplier, " ..
|
description = "Actors are pulled down by double the weight of all equipped gear multiplied by a hundredth of the down-pull multiplier, " ..
|
||||||
"except any weight above 135 only counts 10%. Lessens the gap between the lightest and heaviest heavy armours.",
|
"except any weight above 135 only counts 10%. Lessens the gap between the lightest and heaviest heavy armours.",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
mode = "encumbrancePercentage",
|
mode = "encumbrancePercentage",
|
||||||
value = 2,
|
|
||||||
description = "Actors are pulled down by their encumbrance percentage multiplied by triple the down-pull multiplier.",
|
description = "Actors are pulled down by their encumbrance percentage multiplied by triple the down-pull multiplier.",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
mode = "worstCaseScenario",
|
mode = "worstCaseScenario",
|
||||||
value = 4,
|
|
||||||
description = "Calculates results from all formulas, and uses the highest value.",
|
description = "Calculates results from all formulas, and uses the highest value.",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ this.defaultConfig = {
|
||||||
allEquipment = 100,
|
allEquipment = 100,
|
||||||
encumbrancePercentage = 100
|
encumbrancePercentage = 100
|
||||||
},
|
},
|
||||||
mode = common.modes[1].value,
|
mode = common.modes[1].mode,
|
||||||
allEquipmentWorstCaseNecroMode = true
|
allEquipmentWorstCaseNecroMode = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ local function sinkInWater(e)
|
||||||
-- calculate the down-pull with the configured formula
|
-- calculate the down-pull with the configured formula
|
||||||
else
|
else
|
||||||
for _, t in ipairs(common.modes) do
|
for _, t in ipairs(common.modes) do
|
||||||
if t.value == config.mode then
|
if t.mode == config.mode then
|
||||||
downPull, debugStr = formulas[t.mode](actor, mobile, ref)
|
downPull, debugStr = formulas[t.mode](actor, mobile, ref)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
|
@ -31,7 +31,7 @@ local function createOptions()
|
||||||
local options = {}
|
local options = {}
|
||||||
|
|
||||||
for _, t in ipairs(common.modes) do
|
for _, t in ipairs(common.modes) do
|
||||||
options[#options+1] = {label = common.camelCaseToWords(t.mode), value = t.value}
|
options[#options+1] = {label = common.camelCaseToWords(t.mode), value = t.mode}
|
||||||
end
|
end
|
||||||
|
|
||||||
return options
|
return options
|
||||||
|
|
Loading…
Add table
Reference in a new issue