awilliamson / inp-sb

INP Spacebuild
http://inp.io
3 stars 2 forks source link

Modules #1

Open samcooke98 opened 11 years ago

samcooke98 commented 11 years ago

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 commented 11 years ago

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 commented 11 years ago

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?