add option to affect only player
This commit is contained in:
parent
db0b66ca3f
commit
88bbd2d0cb
3 changed files with 10 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
local common = require("celediel.ASinkingFeeling.common")
|
local common = require("celediel.ASinkingFeeling.common")
|
||||||
|
|
||||||
local defaultConfig = {enabled = true, debug = false, downPullMultiplier = 100, mode = common.modes.equippedArmour}
|
local defaultConfig = {enabled = true, debug = false, playerOnly = false, downPullMultiplier = 100, mode = common.modes.equippedArmour}
|
||||||
local config = mwse.loadConfig(common.configString, defaultConfig)
|
local config = mwse.loadConfig(common.configString, defaultConfig)
|
||||||
|
|
||||||
return config
|
return config
|
|
@ -45,6 +45,9 @@ local function sinkInWater(e)
|
||||||
-- no creatures
|
-- no creatures
|
||||||
if mobile.actorType == tes3.actorType.creature then return end
|
if mobile.actorType == tes3.actorType.creature then return end
|
||||||
|
|
||||||
|
-- if configured to be player only, bail if not player
|
||||||
|
if config.playerOnly and mobile.actorType ~= tes3.actorType.player then return end
|
||||||
|
|
||||||
local downPull = 0
|
local downPull = 0
|
||||||
|
|
||||||
-- calculate the down-pull with the configured formula
|
-- calculate the down-pull with the configured formula
|
||||||
|
|
|
@ -19,6 +19,12 @@ category:createYesNoButton({
|
||||||
variable = createTableVar("enabled")
|
variable = createTableVar("enabled")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
category:createYesNoButton({
|
||||||
|
label = "Player-only",
|
||||||
|
description = "The mod only affects the player, not other actors.",
|
||||||
|
variable = createTableVar("playerOnly")
|
||||||
|
})
|
||||||
|
|
||||||
category:createDropdown({
|
category:createDropdown({
|
||||||
label = "Down-pull formula",
|
label = "Down-pull formula",
|
||||||
description = "Formula used to calculate down-pull amount.\n\nOptions are: Equipped Armour, Equipment Weight, Encumbrance\n\n" ..
|
description = "Formula used to calculate down-pull amount.\n\nOptions are: Equipped Armour, Equipment Weight, Encumbrance\n\n" ..
|
||||||
|
|
Loading…
Add table
Reference in a new issue