mirror of
https://github.com/appgurueu/modlib.git
synced 2024-08-19 04:44:11 +02:00
Vector: Remove modlib dependency
This commit is contained in:
parent
c0ec9a2925
commit
a14fa1143d
@ -1,5 +1,5 @@
|
|||||||
-- Localize globals
|
-- Localize globals
|
||||||
local assert, math, modlib, pairs, rawset, setmetatable, unpack, vector = assert, math, modlib, pairs, rawset, setmetatable, unpack, vector
|
local assert, math, pairs, rawset, setmetatable, unpack, vector = assert, math, pairs, rawset, setmetatable, unpack, vector
|
||||||
|
|
||||||
-- Set environment
|
-- Set environment
|
||||||
local _ENV = {}
|
local _ENV = {}
|
||||||
@ -11,11 +11,10 @@ index_aliases = {
|
|||||||
x = 1,
|
x = 1,
|
||||||
y = 2,
|
y = 2,
|
||||||
z = 3,
|
z = 3,
|
||||||
w = 4
|
w = 4;
|
||||||
|
"x", "y", "z", "w";
|
||||||
}
|
}
|
||||||
|
|
||||||
modlib.table.add_all(index_aliases, modlib.table.flip(index_aliases))
|
|
||||||
|
|
||||||
metatable = {
|
metatable = {
|
||||||
__index = function(table, key)
|
__index = function(table, key)
|
||||||
local index = index_aliases[key]
|
local index = index_aliases[key]
|
||||||
|
Loading…
Reference in New Issue
Block a user