Fixes #2254. Added an optional flag to specify the types of methods to stop a unit from walking. Created an enum for the unit_stop_walking flags. Thanks to @Yuchinin and @Lemongrass3110!