mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Workshop fixes
This commit is contained in:
parent
4ef1c92858
commit
258b3c7535
@ -498,7 +498,7 @@ impl Site {
|
|||||||
},
|
},
|
||||||
// Workshop
|
// Workshop
|
||||||
5 => {
|
5 => {
|
||||||
let size = (2.0 + rng.gen::<f32>().powf(5.0) * 1.5).round() as u32;
|
let size = (3.0 + rng.gen::<f32>().powf(5.0) * 1.5).round() as u32;
|
||||||
if let Some((aabr, door_tile, door_dir)) = attempt(32, || {
|
if let Some((aabr, door_tile, door_dir)) = attempt(32, || {
|
||||||
site.find_roadside_aabr(
|
site.find_roadside_aabr(
|
||||||
&mut rng,
|
&mut rng,
|
||||||
|
@ -111,9 +111,6 @@ impl Structure for Workshop {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for dir in CARDINALS {
|
|
||||||
for d in 0..3 {
|
|
||||||
let position = center + dir * (3 + d * 2);
|
|
||||||
let mut stations = vec![
|
let mut stations = vec![
|
||||||
SpriteKind::CraftingBench,
|
SpriteKind::CraftingBench,
|
||||||
SpriteKind::Forge,
|
SpriteKind::Forge,
|
||||||
@ -125,6 +122,9 @@ impl Structure for Workshop {
|
|||||||
SpriteKind::Anvil,
|
SpriteKind::Anvil,
|
||||||
SpriteKind::DismantlingBench,
|
SpriteKind::DismantlingBench,
|
||||||
];
|
];
|
||||||
|
for d in 0..3 {
|
||||||
|
for dir in CARDINALS {
|
||||||
|
let position = center + dir * (3 + d * 2);
|
||||||
if !stations.is_empty() {
|
if !stations.is_empty() {
|
||||||
let cr_station = stations.swap_remove(
|
let cr_station = stations.swap_remove(
|
||||||
RandomField::new(0).get(position.with_z(base)) as usize % stations.len(),
|
RandomField::new(0).get(position.with_z(base)) as usize % stations.len(),
|
||||||
|
Loading…
Reference in New Issue
Block a user