Are element properties using bit masking for the flags?
Well I managed to find a way to check if a flag is set or not. The bit libarary is in fact what I needed.
bit.band(tpt.el.stne.properties,elements.TYPE_PART) == elements.TYPE_PART
Is it still bad to use tpt.* in console? I know it shouldn't be done in production code. Also I never noticed that elem can be used instead of elements.