Skip to content
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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Added constraint library #402

wants to merge 1 commit into from

Conversation

davidsonbr
Copy link

Not sure if I should just make these methods for the entity type. LMK

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newline

@awilliamson
Copy link
Member

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 )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed return comment

@awilliamson
Copy link
Member

@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)
And for the sake of completeness

It's funny you think reusing open code [...] is considered plagiarism. I copy pasted it to save time and got the task done.

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:

I made it and then I closed the pr 3 days later because the contributors are too lazy to merge

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
Copy link
Member

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.

@Xandaros
Copy link
Member

@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?
I think not.

Your version:
His version:

As far as I'm concerned, you stole from him!

Oh yeah, his commits also pre-date yours. Just saying.

@awilliamson
Copy link
Member

@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.

@awilliamson
Copy link
Member

@EpicG I remember you saying this was still a bit WIP. Any updates in regards to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants