alienari / bitfighter

Automatically exported from code.google.com/p/bitfighter
Other
0 stars 0 forks source link

RFC: Lua API Normalization #236

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I noticed some burrs while working on the lua docs. Here are some changes I'd 
like to suggest:

BfObject:getClassId() -> BfObject:getObjType()
Since it's comparison equal to the ObjType enum, and called ObjType internally.

BfObject:getLoc() -> BfObject:getPos()
BfObject:setLoc() -> BfObject:setPos()
Position is the standard physics term. We can simply document that the 
definition of "position" changes with context.

Item:isInCaptureZone() -> [Remove]

SpeedZone:getDir() -> SpeedZone:getAngle()
SpeedZone:setDir() -> SpeedZone:setAngle()
setDir() directly sets vertex 2, getDir() returns point.normalize(v2-v1)
Thus, zone1:setDir(zone2:getDir()) will not work as expected. I think it's 
better just to use angle anyway.

Can we implement BfObject:clone() now?

LuaPlayerInfo:getOwner() / LuaPlayerInfo:setOwner()
getOwner returns a LuaPlayerInfo, setOwner accepts a player name as a string.

Original issue reported on code.google.com by bkcon...@gmail.com on 9 Aug 2013 at 3:38

GoogleCodeExporter commented 9 years ago

Original comment by bkcon...@gmail.com on 9 Aug 2013 at 3:39

GoogleCodeExporter commented 9 years ago
I made the following API changes for 019:

BfObject:getClassId() -> BfObject:getObjType()

BfObject:getLoc() -> BfObject:getPos()
BfObject:setLoc() -> BfObject:setPos()

The rest seem non-trivial and not particularly useful, so I'm relabeling the 
rest for 020

Original comment by bkcon...@gmail.com on 29 Aug 2013 at 8:21

GoogleCodeExporter commented 9 years ago
Mass priority downgrades for long-standing or not immediately important issues.

Original comment by bkcon...@gmail.com on 5 Dec 2013 at 6:11