diff --git a/Data Files/Ashfall.esp b/Data Files/Ashfall.esp index 7634e3f6..58c6dd4e 100644 Binary files a/Data Files/Ashfall.esp and b/Data Files/Ashfall.esp differ diff --git a/Data Files/Icons/ashfall/craft/shoji_lamp_01.dds b/Data Files/Icons/ashfall/craft/shoji_lamp_01.dds new file mode 100644 index 00000000..13c7f08f Binary files /dev/null and b/Data Files/Icons/ashfall/craft/shoji_lamp_01.dds differ diff --git a/Data Files/MWSE/mods/mer/ashfall/bushcrafting/config.lua b/Data Files/MWSE/mods/mer/ashfall/bushcrafting/config.lua index f5ebd762..2e97b489 100644 --- a/Data Files/MWSE/mods/mer/ashfall/bushcrafting/config.lua +++ b/Data Files/MWSE/mods/mer/ashfall/bushcrafting/config.lua @@ -335,7 +335,14 @@ this.materials = { ids = { "ingred_raw_glass_01" } - } + }, + { + id = "paper", + name = "Paper", + ids = { + "sc_paper plain", + } + }, } this.ingredMaterials = {} for name, ingredient in pairs(this.materials) do @@ -921,6 +928,18 @@ local bushCraftingRecipes = { this.menuOptions.rename }, }, + { + id = "bushcraft:ashfall_shoji_lamp_01", + craftableId = "ashfall_shoji_lamp_01", + description = "A lantern made of paper and wood.", + materials = { + { material = "wood", count = 2 }, + { material = "paper", count = 2 }, + { material = "resin", count = 1 } + }, + category = this.categories.survival, + soundType = "wood", + } }, journeyman = { { diff --git a/Data Files/MWSE/mods/mer/ashfall/items/init.lua b/Data Files/MWSE/mods/mer/ashfall/items/init.lua index 8c22cff2..ad843865 100644 --- a/Data Files/MWSE/mods/mer/ashfall/items/init.lua +++ b/Data Files/MWSE/mods/mer/ashfall/items/init.lua @@ -8,6 +8,7 @@ require("mer.ashfall.items.bugnet") require("mer.ashfall.items.door") require("mer.ashfall.items.dummy") require("mer.ashfall.items.firewood") +require("mer.ashfall.items.lantern") require("mer.ashfall.items.planter") require("mer.ashfall.items.teaWarmer") require("mer.ashfall.items.waterFilter") diff --git a/Data Files/MWSE/mods/mer/ashfall/items/lantern/config.lua b/Data Files/MWSE/mods/mer/ashfall/items/lantern/config.lua new file mode 100644 index 00000000..0463229a --- /dev/null +++ b/Data Files/MWSE/mods/mer/ashfall/items/lantern/config.lua @@ -0,0 +1,7 @@ +local lanternConfig = {} + +lanternConfig.ids = { + ashfall_shoji_lamp_01 = true +} + +return lanternConfig \ No newline at end of file diff --git a/Data Files/MWSE/mods/mer/ashfall/items/lantern/init.lua b/Data Files/MWSE/mods/mer/ashfall/items/lantern/init.lua new file mode 100644 index 00000000..62176fb4 --- /dev/null +++ b/Data Files/MWSE/mods/mer/ashfall/items/lantern/init.lua @@ -0,0 +1,21 @@ +local lanternConfig = require("mer.ashfall.items.lantern.config") +local SwitchNode = require("CraftingFramework.nodeVisuals.SwitchNode") +local NodeManager = require("CraftingFramework.nodeVisuals.NodeManager") +--Always turn off handle so it doesn't show when dropped +-- defaults to on when equipped +local switchConfig = { + id = "LANTERN_HANDLE_SWITCH", + getActiveIndex = function(self, e) + return self.getIndex(e.node, "OFF") + end +} + +local switchNode = SwitchNode.new(switchConfig) + +NodeManager.register{ + id = "Ashfall_lantern_handle", + nodes = { switchNode }, + referenceRequirements = function(reference) + return lanternConfig.ids[reference.object.id:lower()] + end +} \ No newline at end of file diff --git a/Data Files/MWSE/mods/mer/ashfall/needs/thirstController.lua b/Data Files/MWSE/mods/mer/ashfall/needs/thirstController.lua index 3da11619..4db715b6 100644 --- a/Data Files/MWSE/mods/mer/ashfall/needs/thirstController.lua +++ b/Data Files/MWSE/mods/mer/ashfall/needs/thirstController.lua @@ -167,15 +167,12 @@ end ---@param source Ashfall.LiquidContainer ---@param item tes3item ---@param itemData tes3itemData +---@return boolean, string? function this.canTransferFilter(source, item, itemData) local target = LiquidContainer.createFromInventory(item, itemData) if not target then return false end - local canTransfer, reason = source:canTransfer(target) - if not canTransfer then - --logger:warn("Can't transfer: %s", reason) - end - return canTransfer + return canTransfer, reason end function this.playerHasFillableContainers(source) @@ -206,6 +203,7 @@ function this.playerHasFillableContainers(source) return false end + --Fill a bottle to max water capacity function this.fillContainer(params) params = params or {} @@ -214,12 +212,15 @@ function this.fillContainer(params) local source = params.source or LiquidContainer.createInfiniteWaterSource() local callback = params.callback timer.delayOneFrame(function() - local noResultsText = common.messages.noContainersToFill common.helper.showInventorySelectMenu{ title = "Select Water Container", - noResultsText = noResultsText, + noResultsText = common.messages.noContainersToFill, filter = function(e) - return this.canTransferFilter(source, e.item, e.itemData) + local canTransfer, reason = this.canTransferFilter(source, e.item, e.itemData) + if reason then + logger:trace(reason) + end + return canTransfer end, callback = function(e) if e.item then diff --git a/Data Files/Meshes/ashfall/craft/shoji_lamp_01.nif b/Data Files/Meshes/ashfall/craft/shoji_lamp_01.nif new file mode 100644 index 00000000..0b86239e Binary files /dev/null and b/Data Files/Meshes/ashfall/craft/shoji_lamp_01.nif differ