mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Added fruit trees
This commit is contained in:
parent
bbd7f579d2
commit
e7dd151833
BIN
assets/world/tree/fruit/1.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/tree/fruit/1.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/tree/fruit/2.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/tree/fruit/2.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/tree/fruit/3.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/tree/fruit/3.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/tree/fruit/4.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/tree/fruit/4.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/tree/fruit/5.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/tree/fruit/5.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/tree/fruit/6.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/tree/fruit/6.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -14,6 +14,7 @@ pub enum StructureBlock {
|
||||
PineLeaves,
|
||||
Acacia,
|
||||
PalmLeaves,
|
||||
Fruit,
|
||||
Block(Block),
|
||||
}
|
||||
|
||||
@ -92,6 +93,7 @@ impl Asset for Structure {
|
||||
1 => StructureBlock::PineLeaves,
|
||||
2 => StructureBlock::PalmLeaves,
|
||||
4 => StructureBlock::Acacia,
|
||||
7 => StructureBlock::Fruit,
|
||||
index => {
|
||||
let color = palette
|
||||
.get(index as usize)
|
||||
|
@ -327,6 +327,11 @@ impl<'a> BlockGen<'a> {
|
||||
)
|
||||
.map(|e| e as u8),
|
||||
),
|
||||
StructureBlock::Fruit => Block::new(
|
||||
1,
|
||||
Lerp::lerp(Rgb::new(255.0, 0.0, 0.0), Rgb::new(200.0, 255.0, 6.0), lerp)
|
||||
.map(|e| e as u8),
|
||||
),
|
||||
StructureBlock::Block(block) => block,
|
||||
}
|
||||
}
|
||||
|
@ -54,6 +54,7 @@ pub fn structure_gen<'a>(
|
||||
ForestKind::Palm => &PALMS,
|
||||
ForestKind::Savannah => &ACACIAS,
|
||||
ForestKind::Oak if QUIRKY_RAND.get(st_seed) % 16 == 7 => &OAK_STUMPS,
|
||||
ForestKind::Oak if QUIRKY_RAND.get(st_seed) % 8 == 7 => &FRUIT_TREES,
|
||||
ForestKind::Oak => &OAKS,
|
||||
ForestKind::Pine => &PINES,
|
||||
ForestKind::SnowPine => &SNOW_PINES,
|
||||
@ -371,6 +372,16 @@ lazy_static! {
|
||||
st_asset("world/tree/acacia/5.vox", (19, 18, 1)),
|
||||
];
|
||||
|
||||
pub static ref FRUIT_TREES: Vec<Arc<Structure>> = vec![
|
||||
// snow pines
|
||||
st_asset("world/tree/fruit/1.vox", (5, 5, 7)),
|
||||
st_asset("world/tree/fruit/2.vox", (5, 5, 7)),
|
||||
st_asset("world/tree/fruit/3.vox", (5, 5, 7)),
|
||||
st_asset("world/tree/fruit/4.vox", (5, 5, 7)),
|
||||
st_asset("world/tree/fruit/5.vox", (5, 5, 7)),
|
||||
st_asset("world/tree/fruit/6.vox", (5, 5, 7)),
|
||||
];
|
||||
|
||||
/*
|
||||
// snow birches -> need roots!
|
||||
assets::load_map("world/tree/snow_birch/1.vox", |s: Structure| s
|
||||
|
Loading…
Reference in New Issue
Block a user