-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added constraint library #402
base: develop
Are you sure you want to change the base?
Conversation
if not SF.Permissions.check( SF.instance.player, entb, "constraint.any" ) then SF.throw( "Insufficient permissions", 2 ) end | ||
|
||
return vwrap( constraint.Weld( unwrap( enta ), unwrap( entb ), bonea, boneb, forcelimit, nocollide, false ) ) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline
Although the constraint library requires Entity as a dependency doesn't mean it should be included as such. It's namespaced separately and the functions used are separate. They just take input of entities. |
-- @param boneb The bone of the second entity, 0 for regualar props | ||
-- @param forcelimit The amount of forece appliable to the constraint before it breaks ( 0 is never ) | ||
-- @param nocollide True to nocollide the entities | ||
function constraint_lib.weld( enta, entb, bonea, boneb, forcelimit, nocollide ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed return comment
@thegrb93 It's not difficult to make this library. Most of it is boilerplate anyway. A look at the docs for the constraint library on the GMod wiki gives you everything you need. I reference: #328 (comment)
You can't have it both ways. If you think that @EpicG, for whatever reason, copied your library rather than making it from scratch prove so. Prove the original content, prove it wasn't open source or that the license prohibited redistribution or derivative works. As far as I can see, this isn't a 'difficult' addition. As for:
In the real world PRs don't get resolved within 3 days usually, it's actually rare for that to happen unless it's a small 1 hunk change. |
local constraints = constraint.GetTable( ent ) | ||
|
||
local ret = {} | ||
for k, v in pairs( constraints ) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this can be done using SF.Santitize ( check spelling and caps ). That will step through, even recursively, and wrap things that need to be wrapped. You'd only need to set Type then. That's the safest way incase anything is changed in how the constraints table is formatted in the future.
@thegrb93 Well, it took me a moment to see what looks copied and what doesn't, but I finally found a function: getTable. With one minor difference, that being that EpicG's version actually works, they are identical. The funny thing is, though... his version was made in multiple commits, wheras yours is just a single one. Why go through the trouble of splitting it up, especially when they aren't even strictly about that function, but rather on the library as a whole? You obviously created it with a single commit, he then chopped off the permissions only to reintegrate them exactly as you have later, together with permissions for the rest of the library? As far as I'm concerned, you stole from him! Oh yeah, his commits also pre-date yours. Just saying. |
@thegrb93 In light of this evidence, I suggest you think very carefully next time you try to claim that people are stealing from you when in fact you have stolen from them. Now I've seen that getTable function ( which is very specific in implementation ), it appears to be copied. It's like how you catch people copying on tests, because they get the same section wrong in the exact same, odd, way. I can't believe you have the audacity to accuse @EpicG of stealing when you have done so yourself, as evidenced by the above. This is the very exact reason you were initially banned from contributing to this organisational repo ( Which you should still be banned from? ). It is apparent that you haven't learnt anything in that time on how to function as a member of the open source community or to get along with your fellow developers. |
@EpicG I remember you saying this was still a bit WIP. Any updates in regards to this? |
Not sure if I should just make these methods for the entity type. LMK