From 4838ebec5ca7b821f3c08a22479490f7c798dbe5 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Wed, 7 Aug 2019 22:14:18 -0700 Subject: [PATCH] Don't error out when arrow keys used. Fix the logging here so we can figure out which events are causing the messages. --- mods/terminal/init.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mods/terminal/init.lua b/mods/terminal/init.lua index 7dd4f13..18a3546 100644 --- a/mods/terminal/init.lua +++ b/mods/terminal/init.lua @@ -354,7 +354,7 @@ function term.recv(player, fields, context) local name = player:get_player_name() local c = context if not c or not c.pos then - log.fs_data(player, name, "terminal:", fields) + log.fs_data(player, name, "term.recv/context", fields) return true end @@ -456,9 +456,12 @@ function term.recv(player, fields, context) elseif fields.output then -- CHG events - do not return true return + elseif fields.input then + -- KEYBOARD events - do not return true + return end - log.fs_data(player, name, "terminal:", fields) + log.fs_data(player, name, "term.recv/default", fields) return true end @@ -470,7 +473,7 @@ function term.edit(player, fields, context) local name = player:get_player_name() local c = context if not c or not c.pos or not c.output then - log.fs_data(player, name, "terminal:", fields) + log.fs_data(player, name, "term.edit/terminal", fields) return true end local output = c.output @@ -517,7 +520,7 @@ function term.draft(player, fields, context) local name = player:get_player_name() local c = context if not c or not c.pos or not c.output then - log.fs_data(player, name, "terminal:", fields) + log.fs_data(player, name, "term.draft/terminal", fields) return true end local output = c.output -- 2.11.4.GIT