add option to affect only player

This commit is contained in:
Lilian Jónsdóttir 2021-08-08 18:40:12 -07:00
parent db0b66ca3f
commit 88bbd2d0cb
3 changed files with 10 additions and 1 deletions

View file

@ -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

View file

@ -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

View file

@ -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" ..