Skip to content

Commit

Permalink
v3.18.16
Browse files Browse the repository at this point in the history
  • Loading branch information
jhaakma committed Apr 14, 2024
1 parent 49b6941 commit 325b287
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Data Files/Ashfall-metadata.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",]
Expand Down
10 changes: 10 additions & 0 deletions Data Files/MWSE/mods/mer/ashfall/camping/brewerController.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions Data Files/MWSE/mods/mer/ashfall/camping/stewerController.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
36 changes: 0 additions & 36 deletions Data Files/MWSE/mods/mer/ashfall/referenceController.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 325b287

Please sign in to comment.