Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Helpers/MethodWrappers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,5 +202,11 @@ public static void InstantTeleport(Scene scene, Player player, string room, bool
};
}
}

public static Postcard CreatePostcard(string dialog, string sfxIn, string sfxOut)
=> new Postcard(Dialog.Get(dialog) ?? dialog, sfxIn, sfxOut);

public static Postcard CreatePostcard(string dialog, int area)
=> new Postcard(Dialog.Get(dialog) ?? dialog, area);
}
}
6 changes: 2 additions & 4 deletions LuaCutscenes/Assets/LuaCutscenes/helper_functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,12 @@ end
-- @tparam any sfxIn effect when opening the postcard or area ID.
-- @string[opt=nil] sfxOut Sound effect when closing the postcard. If not used then second argument is assumed to be area ID.
function helpers.postcard(dialog, sfxIn, sfxOut)
local message = celeste.Dialog.Get(dialog) or dialog
local postcard

if sfxOut then
postcard = celeste.Postcard(message, sfxIn, sfxOut)

postcard = celeste.Mod[modName].MethodWrappers.CreatePostcard(dialog, sfxIn, sfxOut)
else
postcard = celeste.Postcard(message, sfxIn)
postcard = celeste.Mod[modName].MethodWrappers.CreatePostcard(dialog, sfxIn)
end

getRoom():add(postcard)
Expand Down