WorldNPC.lua - chat on bumpInto

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
Dao Zeti
Higher
Posts: 79
Joined: Sun Oct 19, 2014 2:02 pm

WorldNPC.lua - chat on bumpInto

#1 Post by Dao Zeti »

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
...

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: WorldNPC.lua - chat on bumpInto

#2 Post by HousePet »

Well it somehow works for the hermit alchemist?
My feedback meter decays into coding. Give me feedback and I make mods.

Dao Zeti
Higher
Posts: 79
Joined: Sun Oct 19, 2014 2:02 pm

Re: WorldNPC.lua - chat on bumpInto

#3 Post by Dao Zeti »

Well, the hermit doesn't bumpInto you - instead you activate the chat, I believe? At least I encountered an error when creating caravans (WorldNPCs like neutral patrols that offer you a trade) for the bazaar mod and had to superload the chat part of the function.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: WorldNPC.lua - chat on bumpInto

#4 Post by darkgod »

fixed
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply