Poll: Remove cCuboid?
You do not have permission to vote in this poll.
Yes, and add replacement API functions
57.14%
4 57.14%
Yes, and do NOT add replacement API functions
0%
0 0%
No, keep it
14.29%
1 14.29%
No, keep it, BUT add replacement functions, too.
28.57%
2 28.57%
Total 7 vote(s) 100%
* You voted for this item. [Show Results]

Remove cCuboid class?
#1
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?
Reply
Thanks given by:
#2
Those of you voting "keep", could you provide the rationale behind your decision? I'd like to discuss.
Reply
Thanks given by:
#3
i think it should stay so no plugins will be broken but if the other option is better that should be added to
Reply
Thanks given by:
#4
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.
Reply
Thanks given by:
#5
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 Wink )
Reply
Thanks given by:
#6
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.
Reply
Thanks given by:
#7
Who cares, if people wanna use it, let them use it. Leave it in, it's not like it's a problem
Reply
Thanks given by:
#8
Alright alright, just don't kill meTongue
Reply
Thanks given by:
#9
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.
Reply
Thanks given by:
#10
I wouldn't call it deprecated. It's just thereTongue
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 caresTongue
Reply
Thanks given by:




Users browsing this thread: 4 Guest(s)