Instead of all these type checking, you can make hackingtool's afterattack use the attackby of a screwdriver/multitool already in its contents.