From cf8e9755fc8438a64dffe3f2eeb9a0269f590eae Mon Sep 17 00:00:00 2001 From: Dregu Date: Thu, 9 Nov 2023 20:20:49 +0200 Subject: [PATCH] add safe io functions to spel2.lua --- docs/game_data/spel2.lua | 5 +++++ docs/generate_emmylua.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/docs/game_data/spel2.lua b/docs/game_data/spel2.lua index 1c06048ca..3d4dc4ed3 100644 --- a/docs/game_data/spel2.lua +++ b/docs/game_data/spel2.lua @@ -40,6 +40,11 @@ exports = nil ---@type Json json = nil +io.open_data = io.open +io.open_mod = io.open +os.remove_data = os.remove +os.remove_mod = os.remove + -- Functions diff --git a/docs/generate_emmylua.py b/docs/generate_emmylua.py index 16bebb248..665ea88df 100644 --- a/docs/generate_emmylua.py +++ b/docs/generate_emmylua.py @@ -227,6 +227,11 @@ def main(): ---@field encode fun(tbl: table): string @Encode a table into a json string ---@type Json json = nil + +io.open_data = io.open +io.open_mod = io.open +os.remove_data = os.remove +os.remove_mod = os.remove """) print("\n-- Functions\n")