This repository was archived by the owner on May 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -28,13 +28,14 @@ fn bsp_gen(width_as_str: &str,
2828 let default_hash: u64 = rand:: thread_rng ( ) . gen ( ) ;
2929 let width = width_as_str. parse :: < i32 > ( ) ?;
3030 let height = height_as_str. parse :: < i32 > ( ) ?;
31- let mut map_subsection_min_size = map_subsection_min_size_as_str. parse :: < i32 > ( ) ?;
3231 let map_subsection_min_room_width = map_subsection_min_room_width_as_str. parse :: < i32 > ( ) ?;
3332 let map_subsection_min_room_height = map_subsection_min_room_height_as_str. parse :: < i32 > ( ) ?;
3433
35- if map_subsection_min_size < map_subsection_min_room_width || map_subsection_min_size < map_subsection_min_room_height{
36- map_subsection_min_size = cmp:: max ( map_subsection_min_room_width, map_subsection_min_room_height) + 1
37- }
34+ let map_subsection_min_size = cmp:: max (
35+ map_subsection_min_size_as_str. parse :: < i32 > ( ) ?,
36+ cmp:: max ( map_subsection_min_room_width, map_subsection_min_room_height) + 1
37+ ) ;
38+
3839 //let seed: &str = Alphanumeric.sample_string(&mut rand::thread_rng(), 32).as_str();
3940
4041 let mut rng: StdRng = SeedableRng :: seed_from_u64 ( hash_as_str. parse :: < usize > ( ) ?. try_into ( ) . unwrap_or ( default_hash) ) ;
You can’t perform that action at this time.
0 commit comments