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

Modules #1

Open
samcooke98 opened this issue Jul 7, 2013 · 2 comments
Open

Modules #1

samcooke98 opened this issue Jul 7, 2013 · 2 comments
Labels

Comments

@samcooke98
Copy link
Collaborator

Modules must be done in the 'old way'

This is because the GLua function require is the lua 5.1 version.

The file must look like;

--Method Two: Lua 5.0 & 5.1
module("testModuleTwo",package.seeall)

function TestTwo()
    print("Lua 5.0 Module Loaded Successfully.")
    print("Test Two Succeeded")
end

A possible workaround would be to override the require function to our own require function that searches (using the file library) through the module folder and includes them. This would mean the file no longer contains a 'return' at the end

@awilliamson
Copy link
Owner

Fair enough if Gmod is using 5.1 we'll stick with that system. Workaround would cause some issues, I'd prefer not to change default language implementation.

@samcooke98
Copy link
Collaborator Author

I agree

https://gist.github.com/selekton99/c6f27bd547a6836dd721

Also regarding perma poly welds;
1: The Prop_physics are changed to prop_dynamic
2: A new entity, called Perma Poly Weld is generated using the meshes from the prop_dynamics
3: the Prop_dynamic is parented to the gmod_poly

The problem comes from the gmod_poly having a model of that old blue Hoverball. This is why the new perma weld props seem to roll, as well as the Center of Mass being off ( I presume, perhaps it's unrelated).
If we could solve this problem I believe the perma poly welds would be a much more viable option for the welding.
Don't know how correct this order is, gives an idea of what happens though.

Does anybody know the max size of a lua table?

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

No branches or pull requests

2 participants