From ed99999119272c7feae746363bae567b2f50bd1d Mon Sep 17 00:00:00 2001 From: payonel Date: Wed, 21 Jun 2017 00:45:00 -0700 Subject: [PATCH] tty needs to load full when loading term library due to meta-metatabling --- .../resources/assets/opencomputers/loot/openos/lib/term.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/resources/assets/opencomputers/loot/openos/lib/term.lua b/src/main/resources/assets/opencomputers/loot/openos/lib/term.lua index 3cac78a56..cd1021d21 100644 --- a/src/main/resources/assets/opencomputers/loot/openos/lib/term.lua +++ b/src/main/resources/assets/opencomputers/loot/openos/lib/term.lua @@ -6,7 +6,10 @@ local process = require("process") local kb = require("keyboard") local keys = kb.keys -local term = setmetatable({internal={}}, {__index=tty}) +-- tty is bisected into a delay loaded library +-- term indexing will fail to use full_tty unless tty is fully loaded +-- accessing tty.full_tty [a nonexistent field] will cause that full load +local term = setmetatable({internal={},tty.full_tty}, {__index=tty}) function term.internal.window() return process.info().data.window