From 4f71b878911b5cd3b5574de33ea9e20ddc15360b Mon Sep 17 00:00:00 2001 From: dreamscached Date: Mon, 23 Jan 2023 15:37:38 +0100 Subject: [PATCH] Improve file output --- mod/search.rpy | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mod/search.rpy b/mod/search.rpy index 7f9e0f3..89e69d6 100644 --- a/mod/search.rpy +++ b/mod/search.rpy @@ -171,5 +171,10 @@ init python in _fom_wtf_search: if metadata is not None: return _file, metadata - # Or else just return the script file + # If .RPY source file exists for this .RPYC, return path to original + # file (.RPY not .RPYC) for user's reading/editing convenience + if os.path.exists(_file[:-1]): + return _file[:-1], None + + # Or else return bytecode file return _file, None \ No newline at end of file