GSoC/GCI Archive
Google Code-in 2012 Copyleft Games Group

Bitfighter: Parameterize Lua Constructor for TestItem and ResourceItem

completed by: Martin Bede

mentors: watusimoto, raptor

Remember to join our IRC channel when working on this task! We are on #bitfighter at freenode.net. We are friendly!

Your task

Parameterize Lua constructor for TestItem so one can, from a Lua script, do this:

t = TestItem.new(100,200)

and

t = TestItem.new(new point(100,200))

instead of this:

t = TestItem.new()

t:setLoc(100,200)

Also... parameterize Lua constructor for ResourceItem so one can, from a Lua script, do this:

r = ResourceItem.new(100,200)

and

r = ResourceItem.new(new point(100,200))

instead of this:

r = ResourceItem.new()

r:setLoc(100,200)

Task is complete when a levelgen script and editor plugin can create TestItem and ResourceItem with code above, and new constructors are documented. This should be a fairly easy task.