Move contexts over to the namespace to fix crash

- Move `contexts` into `metatools.contexts`, otherwise there is no way
   assertions.lua will be able to use it
This commit is contained in:
LeMagnesium
2016-09-20 17:19:28 +02:00
parent 0dfec122fe
commit 73c80b1201
2 changed files with 21 additions and 21 deletions

View File

@ -1,7 +1,7 @@
-- Assertion tools for Metatools
function assert_contextid(ctid)
return contexts[ctid] ~= nil
return metatools.contexts[ctid] ~= nil
end
function assert_ownership(ctid, name)
@ -25,7 +25,7 @@ function assert_poslock(pos)
end
function assert_specific_mode(contextid, mode)
return assert_contextid(contextid) and contexts[contextid].mode == mode
return assert_contextid(contextid) and metatools.contexts[contextid].mode == mode
end
function assert_field_type(ftype)