Shooting with heavy weapons

How did you make it only fireable while mounted on something? I was trying to make a 20mm anti-material rifle that would need to be deployed into furniture, but it can’t be currently made that way in JSON alone. Firing while mounted on a stable surface would be an excellent alternative for the rifle at least.