ember sprite

This commit is contained in:
Pfauenauge 2020-04-10 21:08:21 +02:00 committed by Joshua Barretto
parent 15971f0def
commit 67f27ef970
4 changed files with 22 additions and 4 deletions

BIN
assets/voxygen/voxel/sprite/ember/1.vox (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -40,6 +40,7 @@ pub enum BlockKind {
Fern,
DeadBush,
Blueberry,
Ember,
}
impl BlockKind {
@ -81,13 +82,14 @@ impl BlockKind {
BlockKind::Fern => true,
BlockKind::DeadBush => true,
BlockKind::Blueberry => true,
BlockKind::Ember => true,
_ => false,
}
}
pub fn is_fluid(&self) -> bool {
match self {
BlockKind::Water => true,
BlockKind::Water => true,
_ => false,
}
}
@ -123,7 +125,7 @@ impl BlockKind {
BlockKind::LeafyPlant => false,
BlockKind::Fern => false,
BlockKind::DeadBush => false,
BlockKind::Blueberry => false,
BlockKind::Blueberry => false,
_ => true,
}
}
@ -159,6 +161,7 @@ impl BlockKind {
BlockKind::Fern => false,
BlockKind::DeadBush => false,
BlockKind::Blueberry => false,
BlockKind::Ember => false,
_ => true,
}
}
@ -180,7 +183,7 @@ impl BlockKind {
BlockKind::Velorite => true,
BlockKind::VeloriteFrag => true,
BlockKind::Chest => true,
BlockKind::Pumpkin => true,
BlockKind::Pumpkin => true,
_ => false,
}
}

View File

@ -170,6 +170,10 @@ fn sprite_config_for(kind: BlockKind) -> Option<SpriteConfig> {
variations: 4,
wind_sway: 0.1,
}),
BlockKind::Ember => Some(SpriteConfig {
variations: 1,
wind_sway: 4.0,
}),
_ => None,
}
@ -1066,6 +1070,14 @@ impl<V: RectRasterableVol> Terrain<V> {
Vec3::new(-6.0, -6.0, -0.0),
),
),
// Ember
(
(BlockKind::Ember, 0),
make_model(
"voxygen.voxel.sprite.ember.1",
Vec3::new(-6.0, -6.0, -0.0),
),
),
]
.into_iter()
.collect(),

View File

@ -604,7 +604,7 @@ pub fn block_from_structure(
StructureBlock::Fruit => Some(if field.get(pos + structure_pos) % 3 > 0 {
Block::empty()
} else {
Block::new(BlockKind::Apple, Rgb::new(194, 30, 37))
Block::new(BlockKind::Ember, Rgb::new(0, 0, 0))
}),
StructureBlock::Chest => Some(if structure_seed % 10 < 7 {
Block::empty()