support for factories with their own maximum production limits.
see forum post for usage details.
this has some issues, don't commit.
gonna update with upgrading and placement soon anyway
updated, now should be valid.
includes placement restrictions
see forum post for details.
there are a lot of cases to handle here. its possible i missed some or messed one up. so any bugs that come out relating to factories or unit placement, you know where to call.