diff --git a/Data Files/Ashfall-metadata.toml b/Data Files/Ashfall-metadata.toml index 8152749..3834fa0 100644 --- a/Data Files/Ashfall-metadata.toml +++ b/Data Files/Ashfall-metadata.toml @@ -4,7 +4,7 @@ description = "A camping, survival and needs mod for Morrowind." homepage = "https://www.nexusmods.com/morrowind/mods/49057" repository = "https://github.com/jhaakma/ashfall" authors = [ "Merlord",] -version = "3.18.15" +version = "3.18.16" [dependencies] assets = [ "Ashfall.esp", "Icons/ashfall", "Meshes/ashfall", "MWSE/mods/mer/ashfall", "Sound/ashfall", "Textures/Ashfall",] diff --git a/Data Files/MWSE/mods/mer/ashfall/camping/brewerController.lua b/Data Files/MWSE/mods/mer/ashfall/camping/brewerController.lua index b1f6af7..bda2204 100644 --- a/Data Files/MWSE/mods/mer/ashfall/camping/brewerController.lua +++ b/Data Files/MWSE/mods/mer/ashfall/camping/brewerController.lua @@ -12,6 +12,16 @@ temperatureController.registerBaseTempMultiplier({ id = "hollyTeaEffect", coldOn local brewRate = 160 local BREWER_UPDATE_INTERVAL = 0.001 local ReferenceController = require("mer.ashfall.referenceController") +local staticConfigs = require('mer.ashfall.config.staticConfigs') + +ReferenceController.registerReferenceController{ + id = "brewer", + requirements = function(_, ref) + return ref.supportsLuaData + and ref.data + and ref.data.utensil == "kettle" or staticConfigs.kettles[ref.object.id:lower()] + end +} local function removeTeaEffect(teaData) logger:debug("onDrinkTea: removing previous effect") diff --git a/Data Files/MWSE/mods/mer/ashfall/camping/fuelConsumerController.lua b/Data Files/MWSE/mods/mer/ashfall/camping/fuelConsumerController.lua index a425d55..c9a4307 100644 --- a/Data Files/MWSE/mods/mer/ashfall/camping/fuelConsumerController.lua +++ b/Data Files/MWSE/mods/mer/ashfall/camping/fuelConsumerController.lua @@ -10,6 +10,15 @@ local fuelDecayRainEffect = 1.4 local fuelDecayThunderEffect = 1.6 local FUEL_UPDATE_INTERVAL = 0.001 +ReferenceController.registerReferenceController{ + id = "fuelConsumer", + requirements = function(_, ref) + return ref.supportsLuaData + and ref.data + and ref.data.fuelLevel + end +} + local function updateFuelConsumer(fuelConsumer) local timestamp = tes3.getSimulationTimestamp() fuelConsumer.data.lastFuelUpdated = fuelConsumer.data.lastFuelUpdated or timestamp diff --git a/Data Files/MWSE/mods/mer/ashfall/camping/stewerController.lua b/Data Files/MWSE/mods/mer/ashfall/camping/stewerController.lua index 374e30b..162bcb2 100644 --- a/Data Files/MWSE/mods/mer/ashfall/camping/stewerController.lua +++ b/Data Files/MWSE/mods/mer/ashfall/camping/stewerController.lua @@ -12,6 +12,18 @@ local ReferenceController = require("mer.ashfall.referenceController") local stewCookRate = 40 local STEWER_UPDATE_INTERVAL = 0.001 +local staticConfigs = require('mer.ashfall.config.staticConfigs') + +ReferenceController.registerReferenceController{ + id = "stewer", + requirements = function(_, ref) + local isPot = ref.supportsLuaData + and ref.data + and ref.data.utensil == "cookingPot" + or staticConfigs.cookingPots[ref.object.id:lower()] + return isPot + end, +} --Warmth from Stew local function firstDataLoaded() diff --git a/Data Files/MWSE/mods/mer/ashfall/needs/thirstController.lua b/Data Files/MWSE/mods/mer/ashfall/needs/thirstController.lua index c172bbc..3da1161 100644 --- a/Data Files/MWSE/mods/mer/ashfall/needs/thirstController.lua +++ b/Data Files/MWSE/mods/mer/ashfall/needs/thirstController.lua @@ -173,7 +173,7 @@ function this.canTransferFilter(source, item, itemData) local canTransfer, reason = source:canTransfer(target) if not canTransfer then - logger:warn("Can't transfer: %s", reason) + --logger:warn("Can't transfer: %s", reason) end return canTransfer end diff --git a/Data Files/MWSE/mods/mer/ashfall/referenceController.lua b/Data Files/MWSE/mods/mer/ashfall/referenceController.lua index 9a5fe36..220c736 100644 --- a/Data Files/MWSE/mods/mer/ashfall/referenceController.lua +++ b/Data Files/MWSE/mods/mer/ashfall/referenceController.lua @@ -57,42 +57,6 @@ this.controllers = { end }, - fuelConsumer = ReferenceController:new{ - requirements = function(_, ref) - return ref.supportsLuaData - and ref.data - and ref.data.fuelLevel - end - }, - - -- boiler = ReferenceController:new{ - -- requirements = function(_, ref) - -- local isboiler = ref.supportsLuaData - -- and ref.data - -- and ref.data.waterHeat ~= nil - -- return isboiler - -- end - -- }, - - stewer = ReferenceController:new{ - requirements = function(_, ref) - local isPot = ref.supportsLuaData - and ref.data - and ref.data.utensil == "cookingPot" - or staticConfigs.cookingPots[ref.object.id:lower()] - return isPot - end, - }, - - brewer = ReferenceController:new{ - requirements = function(_, ref) - return ref.supportsLuaData - and ref.data - and ref.data.utensil == "kettle" - or staticConfigs.kettles[ref.object.id:lower()] - end - }, - stewBuffedActor = ReferenceController:new{ requirements = function(_, ref) return ref.supportsLuaData