=== added file 'data/fairy.png'
Binary files data/fairy.png 1970-01-01 00:00:00 +0000 and data/fairy.png 2013-04-29 00:08:20 +0000 differ
=== added file 'data/fairy.svg'
--- data/fairy.svg 1970-01-01 00:00:00 +0000
+++ data/fairy.svg 2013-04-29 00:08:20 +0000
@@ -0,0 +1,92 @@
+
+
+
+
=== modified file 'data/foresthut-bg.png'
Binary files data/foresthut-bg.png 2013-04-28 17:18:46 +0000 and data/foresthut-bg.png 2013-04-29 00:08:20 +0000 differ
=== modified file 'data/foresthut.svg'
--- data/foresthut.svg 2013-04-28 19:15:52 +0000
+++ data/foresthut.svg 2013-04-29 00:08:20 +0000
@@ -15,7 +15,7 @@
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="foresthut.svg"
- inkscape:export-filename="/home/josh/code/game/ld26/data/foresthut-fg.png"
+ inkscape:export-filename="/home/josh/code/game/ld26/data/foresthut-bg.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
@@ -47,7 +47,7 @@
image/svg+xml
-
+
@@ -123,6 +123,12 @@
id="rect4444"
style="fill:#72217b;fill-opacity:1;stroke:none" />
+
+
=== modified file 'items.lua'
--- items.lua 2013-04-28 23:19:25 +0000
+++ items.lua 2013-04-29 00:08:20 +0000
@@ -42,6 +42,20 @@
end
}
+Fairy = Sprite:extend{
+ name = 'fairy',
+ invTile = Tile:new{image = 'data/fairy.png'},
+ onCollide = function(self, other, xOl, yOl)
+ if the.inventory.items['cat'] then
+ the.inventory:add(self)
+
+ the.inventory:remove('cat')
+ end
+
+ self:displace(other)
+ end
+}
+
Cat = Tile:extend{
image = 'data/cat.png',
name = 'cat',
=== modified file 'main.lua'
--- main.lua 2013-04-28 23:55:40 +0000
+++ main.lua 2013-04-29 00:08:20 +0000
@@ -72,7 +72,7 @@
end
--the.inventory:add(Flag:new())
- --the.inventory:add(Flower:new())
+ the.inventory:add(Fairy:new())
end,
onUpdate = function (self, dt)
if the.keys:justPressed('escape') then
=== modified file 'svg_levels.lua'
--- svg_levels.lua 2013-04-28 23:19:25 +0000
+++ svg_levels.lua 2013-04-29 00:08:20 +0000
@@ -116,6 +116,8 @@
},
flower = {
},
+fairy = {
+},
shore = {
Displacer:new{
@@ -395,14 +397,14 @@
Displacer:new{
- x = 528.618040, y = 253.272050,
- width = 96.629105, height = 45.472519
+ x = 494.535890, y = 253.272050,
+ width = 130.711270, height = 45.472519
},
Displacer:new{
- x = 459.461910, y = 228.641110,
- width = 34.104382, height = 62.524715
+ x = 359.108890, y = 228.641110,
+ width = 134.457460, height = 68.205078
},
@@ -451,6 +453,12 @@
targetY = 434
},
+
+Fairy:new{
+ x = 395.731810, y = 304.621250,
+ width = 40.709251, height = 58.697060,
+},
+
},
flag = {
},
=== modified file 'svg_levels.py'
--- svg_levels.py 2013-04-28 23:19:25 +0000
+++ svg_levels.py 2013-04-29 00:08:20 +0000
@@ -92,6 +92,18 @@
},
""" % (x,y,w,h)
+ sel = CSSSelector('svg|rect[ink|label="fairy"]', ns)
+ for e in sel(t):
+ x, y = float(e.get('x')), float(e.get('y'))
+ w, h = float(e.get('width')), float(e.get('height'))
+
+ print """
+Fairy:new{
+ x = %f, y = %f,
+ width = %f, height = %f,
+},
+""" % (x,y,w,h)
+
sel = CSSSelector('svg|rect[ink|label="gatetrigger"]', ns)
for e in sel(t):
x, y = float(e.get('x')), float(e.get('y'))