Readded weapon factory code