diff --git a/Helpers/MethodWrappers.cs b/Helpers/MethodWrappers.cs index cca24eb..ac90b97 100644 --- a/Helpers/MethodWrappers.cs +++ b/Helpers/MethodWrappers.cs @@ -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); } } diff --git a/LuaCutscenes/Assets/LuaCutscenes/helper_functions.lua b/LuaCutscenes/Assets/LuaCutscenes/helper_functions.lua index 283ffe3..0da1728 100644 --- a/LuaCutscenes/Assets/LuaCutscenes/helper_functions.lua +++ b/LuaCutscenes/Assets/LuaCutscenes/helper_functions.lua @@ -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)