Skip to content

Commit

Permalink
Merge pull request #2226 from hawkthorne/master
Browse files Browse the repository at this point in the history
Bug fix
  • Loading branch information
edisonout committed Sep 24, 2014
2 parents 77ea5f6 + 2629b39 commit 8e2d57a
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 21 deletions.
Binary file removed src/images/mayorjuan.png
Binary file not shown.
Binary file modified src/images/npc/mayorjuan.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
9 changes: 0 additions & 9 deletions src/maps/valley-tacotown.tmx
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,6 @@
<property name="to" value="main"/>
</properties>
</object>
<object type="sprite" x="264" y="384" width="48" height="48">
<properties>
<property name="animation" value="1-2,1"/>
<property name="height" value="48"/>
<property name="sheet" value="images/mayorjuan.png"/>
<property name="speed" value="0.4"/>
<property name="width" value="48"/>
</properties>
</object>
<object name="mayorjuan" type="npc" x="264" y="384" width="48" height="48"/>
<object name="next" type="door" x="2304" y="336" width="48" height="48"/>
<object type="enemy" x="1600" y="272" width="14" height="25">
Expand Down
8 changes: 6 additions & 2 deletions src/nodes/building.lua
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ end
function Building:burn()
self:burned()
Timer.add(3, function()
self:burn_row(1)
if self.containerLevel:hasNode(self) then
self:burn_row(1)
end
end)
end

Expand All @@ -129,7 +131,9 @@ function Building:burn_row(row)
local tile = self.tiles[(row * self.tileColumns - self.tileColumns) + (column[i] - 1)]
if tile.state ~= 'burned' and tile.state ~= 'burning' then
Timer.add(math.random(0.5,1), function()
self:burn_tile(tile)
if self.containerLevel:hasNode(self) then
self:burn_tile(tile)
end
end)
end
end
Expand Down
4 changes: 2 additions & 2 deletions src/nodes/weapon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@ function Weapon:draw()
local offsetY = 0
if self.flipY == 'true' then
scaley = -1
offsetY = self.boxHeight
offsetY = self.boxHeight or 0
end

-- Flipping an image moves it, this adjust for that image flip offset
local offsetX = 0
if self.direction == 'left' then
offsetX = self.boxWidth
offsetX = self.boxWidth or 0
end

if self.image then
Expand Down
12 changes: 4 additions & 8 deletions src/npcs/mayorjuan.lua
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
-- inculdes

return {
width = 32,
width = 48,
height = 48,
greeting = 'My name is {{red_light}}Juan{{white}}, I am the mayor of {{olive}}Tacotown{{white}}.',
animations = {
default = {
'loop',{'1,1','11,1'},.5,
},
walking = {
'loop',{'1,1','2,1','3,1'},.2,
},

'loop',{'1-2,1'},.4,
}
},

donotfacewhentalking = true,
talk_items = {
{ ['text']='i am done with you' },
{ ['text']='Sick moustache!' },
Expand Down

0 comments on commit 8e2d57a

Please sign in to comment.