Remove cCuboid class? - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Development (https://forum.cuberite.org/forum-13.html) +--- Thread: Remove cCuboid class? (/thread-814.html) Pages:
1
2
|
Remove cCuboid class? - xoft - 02-22-2013 The cCuboid class is present only for the API, and the only two things it does is sorting three sets of two numbers (coord sort) and comparing three coords with six coords (testing if a point is inside). In my opinion this class is highly useless and should be considered for removal from the API. If wanted, we could make single API functions with the similar behavior, but easier usage: local MinX, MaxX, MinY, MaxY, MinZ, MaxZ = SortThreeCoords(X1, X2, Y1, Y2, Z1, Z2); IsPointInside(X, Y, MinX, MaxX, MinY, MaxY, MinZ, MaxZ); How about that? RE: Remove cCuboid class? - xoft - 02-23-2013 Those of you voting "keep", could you provide the rationale behind your decision? I'd like to discuss. RE: Remove cCuboid class? - NiLSPACE - 02-23-2013 i think it should stay so no plugins will be broken but if the other option is better that should be added to RE: Remove cCuboid class? - ThuGie - 02-23-2013 I find it weird if the server has to make due for plugins that dont get upgraded. If there are plugins a replacement should be fine. Btw direct problem, When not logged in then pressing to vote(didnt know i wasnt logged in) And when you get the login screen and login, you get redirected to a white page aka polls.php might wanna fix it. RE: Remove cCuboid class? - xoft - 02-23-2013 Well, keeping compatibility is a good thing, as long as it doesn't over-complicate things. So usually I don't remove API functions / classes unless absolutely necessary. However, in this case, the cCuboid class usage is so twisted that it's actually easier to write out the code which it actually internally does, instead of creating an object instance, calling a function and then querying / reading some values out. I highly doubt *any* plugin uses that. That's why I voted for removal. (Also, I'm too lazy to document it in the wiki ) RE: Remove cCuboid class? - Taugeshtu - 02-24-2013 Oh, come on, now I have to rewrite Portals too? Are you going to remove everything you're too lazy to document? Also, last time I attempted at documenting API (and I remember it pretty fraggin' clear) I documented cCuboid, and there was not a single change in it. RE: Remove cCuboid class? - FakeTruth - 02-24-2013 Who cares, if people wanna use it, let them use it. Leave it in, it's not like it's a problem RE: Remove cCuboid class? - xoft - 02-25-2013 Alright alright, just don't kill me RE: Remove cCuboid class? - keyboard - 02-25-2013 Here are my two cents: We can always leave them in. Make them throw a warning using LOG() saying that these functions are deprecated and that they should use the new API. After 1 to 2 years, we can remove them if nobody is using them anymore. RE: Remove cCuboid class? - FakeTruth - 02-25-2013 I wouldn't call it deprecated. It's just there If you're gonna log all uses of it you can be sure no one is going to use it ever so we might as well remove it. I'd say leave it, who cares |