Bitfighter: Parameterize Lua Constructor for Various Objects Group 2
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 the following items:
Item Parameter set 1 | Parameter set 2 ===================================================== ForceFieldProjector Geom, team | GoalZone Geom, team | LineItem Geom | Geom, team Mine Geom | NexusZone Geom | PolyWall Geom | RepairItem Geom | Geom, regen time SoccerBallItem Geom |This will allow scripters to create an object as follows:
local a = RepairItem.new(100,200)
rather than the more cumbersome current method:
local a = RepairItem.new()
a:RepairItem(100,200)
Task is complete when a levelgen script and editor plugin can create the items above, with the two specified parameter sets, and new constructors are documented. This task looks complex, but is actually pretty easy. There are some good models to follow, and the mentors know exactly what needs to be written.