-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't workinginvalidThis doesn't seem rightThis doesn't seem right
Description
Unless I'm doing something stupid, I think I found a bug where the method passed to ModUtil.mod.Path.Wrap is incorrectly being called twice?
Repro steps:
- In Hades 2, open
Scripts\KeepsakeLogic.luaand updateAdvanceKeepsaketo look like this:
function AdvanceKeepsake( fromTrait )
print("[Game] AdvanceKeepsake actually called")
-- Rest of method unchanged
- Create a mod that wraps
AdvanceKeepsake:
ModUtil.mod.Path.Wrap("AdvanceKeepsake", function(base, fromTrait)
local result = base(fromTrait)
printMsg("[Mod] AdvanceKeepsake wrapper called")
return result
end)
- In Hades 2, beat any room
Expected results:
Console shows this:
[Game] AdvanceKeepsake actually called
[Mod] AdvanceKeepsake wrapper called
Actual results:
Console shows this:
[Game] AdvanceKeepsake actually called
[Mod] AdvanceKeepsake wrapper called
[Mod] AdvanceKeepsake wrapper called
The exact code I am running is here:
https://github.com/BlueRaja/Hades-2-Mods/blob/main/FavorOfTheGods/incantations/odysseus_keepsake_progress.lua#L33
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinginvalidThis doesn't seem rightThis doesn't seem right