diff --git a/src/audio/sfx/sword_hit.ogg b/src/audio/sfx/sword_hit.ogg index 96f17b0d5..715c0f0e5 100644 Binary files a/src/audio/sfx/sword_hit.ogg and b/src/audio/sfx/sword_hit.ogg differ diff --git a/src/maps/blacksmith.tmx b/src/maps/blacksmith.tmx index 2a6487ceb..43c7b87c0 100644 --- a/src/maps/blacksmith.tmx +++ b/src/maps/blacksmith.tmx @@ -56,7 +56,12 @@ - + + + + + + diff --git a/src/nodes/activenpc.lua b/src/nodes/activenpc.lua index babab4224..052c0bdda 100644 --- a/src/nodes/activenpc.lua +++ b/src/nodes/activenpc.lua @@ -73,7 +73,7 @@ end function Activenpc:enter( previous ) if self.props.enter then - self.props.enter(self) + self.props.enter(self, previous) end end diff --git a/src/nodes/activenpcs/blacksmith.lua b/src/nodes/activenpcs/blacksmith.lua index 430a81812..a088e13d5 100644 --- a/src/nodes/activenpcs/blacksmith.lua +++ b/src/nodes/activenpcs/blacksmith.lua @@ -25,10 +25,16 @@ return { file = 'sword_hit', } }, - enter = function(activenpc) - activenpc.state = 'talking' - sound.playSfx("ibuyandsell") - Timer.add(2.8,function() activenpc.state = 'default' end) + enter = function(activenpc, previous) + if not previous.isLevel and previous~=Gamestate.get("overworld") then return end + + Timer.add(1,function() + activenpc.state = 'talking' + sound.playSfx("ibuyandsell") + Timer.add(2.8,function() + activenpc.state = 'default' + end) + end) end, onInteract = function(activenpc, player) local options = {"YES","NO"}