@name Contraption analyis
@inputs 
@outputs [Mass Weld Con Volume]:array LowVol LowMass LowWeld
@persist Prop:entity [Con Weld Mass Volume]:array Welds:table
@trigger 

interval(1000)
E=entity()
O=owner()

if(O:aimEntity()){
    Prop=O:aimEntity()
    Con=array()
    Con=Prop:getConstraints()
    Welds=table()
    Con:pushEntity(Prop)
    Volume=array()
    Weld=array()
    Mass=array()
    for(C=1,Con:count()){
        Weld:pushNumber(Con[C,entity]:hasConstraints("weld"))
        Mass:pushNumber(Con[C,entity]:mass())
        V=Con[C,entity]:boxSize()
        Volume:pushNumber(V:x()*V:y()*V:z())
    }
    LowVol=Volume:minIndex()
    LowMass=Mass:minIndex()
    LowWeld=Weld:minIndex()
}




#[
    An option to copy with bbcode color syntax
    highlighting has been added (for use on forums).
    Right click anywhere in the editor to use it.

    User defined function support has been added.

    The find and replace windows have been combined into
    a single menu, and a go to line function has
    been added. Simply press ctrl+f/g/h to open it.

    Documentation and examples are available at:
    http://wiki.garrysmod.com/?title=Wire_Expression2
    The community is available at http://www.wiremod.com
]#
