use of logisticspipes.proxy.cc.wrapper.CCCommandWrapper in project LogisticsPipes by RS485.
the class LPASMHookCC method onCCWrappedILuaObject.
public static LuaTable onCCWrappedILuaObject(final LuaTable table, final ILuaObject object) {
if (object instanceof CCCommandWrapper) {
LuaTable lpTable = new LPLuaTable((CCCommandWrapper) object);
LuaValue k = LuaValue.NIL;
while (true) {
Varargs n = table.next(k);
if ((k = n.arg1()).isnil()) {
break;
}
LuaValue v = n.arg(2);
lpTable.set(k, v);
}
((CCCommandWrapper) object).table = lpTable;
return lpTable;
}
return table;
}
Aggregations