WorldNPC.lua - chat on bumpInto
Posted: Tue Jan 27, 2015 9:52 am
mod/class/WorldNPC.lua: function _M:bumpInto(...) checks for NPCs with the ability to talk (at the moment, there aren't none, as adventurers/patrols/zigur followers can't talk, so this isn't really problematic); however, the environment for Chat (local Chat = require "engine.Chat") is missing.
Code: Select all
function _M:bumpInto(target, x, y)
...
-- Talk ?
if target.player and self.can_talk then
local chat = Chat.new(self.can_talk, self, target)
chat:invoke()
if self.can_talk_only_once then self.can_talk = nil end
...