@name PotDrop
@inputs AMT
@outputs Eject
@persist Ent:entity DropPos:vector Return:vector ReturnAng:angle
if (first()) {
    DropPos=gTable("drop")["Pos",vector]
    Ent=entity():isWeldedTo()
    entity():createWire(Ent,"AMT","StoredAmount")
    Ent:createWire(entity(),"SpawnAmount","Eject")
    entity():setAlpha(0)
    Return=Ent:pos()
    ReturnAng=Ent:angles()
}
if (AMT) {
    Ent:setPos(DropPos)
    Ent:setAng(ang(0,0,180))
    Eject=AMT
} elseif (!first()) {
    Ent:setPos(Return)
    Ent:setAng(ReturnAng)
    AMT=0
}
