mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
add merchants to savannah pits
This commit is contained in:
parent
97f3fa56d3
commit
6d8f2c8c7b
@ -299,6 +299,35 @@ pub fn init(
|
||||
});
|
||||
}
|
||||
},
|
||||
SiteKind::SavannahPit(site2) => {
|
||||
for _ in 0..4 {
|
||||
rtsim.entities.insert(Entity {
|
||||
is_loaded: false,
|
||||
pos: site2
|
||||
.plots()
|
||||
.filter(|plot| {
|
||||
matches!(plot.kind(), world::site2::PlotKind::SavannahPit(_))
|
||||
})
|
||||
.choose(&mut thread_rng())
|
||||
.map_or(site.get_origin(), |plot| {
|
||||
site2.tile_center_wpos(
|
||||
plot.root_tile()
|
||||
+ Vec2::new(
|
||||
thread_rng().gen_range(-5..5),
|
||||
thread_rng().gen_range(-5..5),
|
||||
),
|
||||
)
|
||||
})
|
||||
.with_z(0)
|
||||
.map(|e| e as f32),
|
||||
seed: thread_rng().gen(),
|
||||
controller: RtSimController::default(),
|
||||
last_time_ticked: 0.0,
|
||||
kind: RtSimEntityKind::Merchant,
|
||||
brain: Brain::merchant(site_id, &mut thread_rng()),
|
||||
});
|
||||
}
|
||||
},
|
||||
SiteKind::DesertCity(site2) => {
|
||||
// villagers
|
||||
for _ in 0..(site2.plazas().len() as f32 * 1.5) as usize {
|
||||
|
@ -1581,6 +1581,12 @@ impl Structure for SavannahPit {
|
||||
}
|
||||
let lantern_pos = tower_center - 3;
|
||||
painter.sprite(lantern_pos.with_z(base + (length / 2)), SpriteKind::Lantern);
|
||||
// tunnel lanterns
|
||||
let tunnel_lantern_pos = tower_center - 3;
|
||||
painter.sprite(
|
||||
tunnel_lantern_pos.with_z(base - (2 * length) - 2),
|
||||
SpriteKind::Lantern,
|
||||
);
|
||||
}
|
||||
// watchtowers with entries
|
||||
for dir in CARDINALS {
|
||||
@ -1644,6 +1650,12 @@ impl Structure for SavannahPit {
|
||||
}
|
||||
let lantern_pos = center + dir * (7 * wall_length);
|
||||
painter.sprite(lantern_pos.with_z(base + (length / 2)), SpriteKind::Lantern);
|
||||
// tunnel lanterns
|
||||
let tunnel_lantern_pos = tower_center;
|
||||
painter.sprite(
|
||||
tunnel_lantern_pos.with_z(base - (2 * length) - 2),
|
||||
SpriteKind::Lantern,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user