From e96a567f62d3863fe66562e2474c5286a35a51e1 Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Thu, 29 Mar 2018 16:40:00 +0200 Subject: [PATCH] mwawawa --- game/engines/default/engine/UserChat.lua | 6 ++++-- game/modules/tome/class/UserChatExtension.lua | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/game/engines/default/engine/UserChat.lua b/game/engines/default/engine/UserChat.lua index 641009ac0d..6ef289b11c 100644 --- a/game/engines/default/engine/UserChat.lua +++ b/game/engines/default/engine/UserChat.lua @@ -253,8 +253,6 @@ Again, thank you, and enjoy Eyal! #{italic}#Your malevolent local god of darkness, #GOLD#DarkGod#{normal}#]]):format(data.donated, data.donated * 10, data.items_vault_slots) Dialog:simpleLongPopup("Thank you!", text, 600) - elseif self.uc_ext then - self.uc_ext:event(e) end elseif e.se == "SelfJoin" then self:addMessage("join", e.channel, profile.auth.login, e.channel, "#{italic}#Joined channel#{normal}#", nil, true) @@ -329,6 +327,10 @@ Again, thank you, and enjoy Eyal! self.channels_changed = true end + if self.uc_ext then + self.uc_ext:event(e) + end + for fct, _ in pairs(self.on_event) do fct(e) end diff --git a/game/modules/tome/class/UserChatExtension.lua b/game/modules/tome/class/UserChatExtension.lua index c1333aeb6a..c70e51a56f 100644 --- a/game/modules/tome/class/UserChatExtension.lua +++ b/game/modules/tome/class/UserChatExtension.lua @@ -86,5 +86,13 @@ function _M:event(e) else self:triggerHook{"UserChat:event", color=color, e=e, data=data} end + elseif e.se == "Talk" then + -- Shake screen? + if e.login == "darkgod" then + if e.msg == e.msg:upper() and #e.msg >= 10 then + game:shakeScreen(30, 5) + game.log("SHAKING") + end + end end end -- GitLab