mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
ember sprite
This commit is contained in:
parent
e98a6063b9
commit
6a7e83d2c1
BIN
assets/voxygen/voxel/sprite/ember/1.vox
Normal file
BIN
assets/voxygen/voxel/sprite/ember/1.vox
Normal file
Binary file not shown.
@ -40,6 +40,7 @@ pub enum BlockKind {
|
|||||||
Fern,
|
Fern,
|
||||||
DeadBush,
|
DeadBush,
|
||||||
Blueberry,
|
Blueberry,
|
||||||
|
Ember,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BlockKind {
|
impl BlockKind {
|
||||||
@ -81,13 +82,14 @@ impl BlockKind {
|
|||||||
BlockKind::Fern => true,
|
BlockKind::Fern => true,
|
||||||
BlockKind::DeadBush => true,
|
BlockKind::DeadBush => true,
|
||||||
BlockKind::Blueberry => true,
|
BlockKind::Blueberry => true,
|
||||||
|
BlockKind::Ember => true,
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_fluid(&self) -> bool {
|
pub fn is_fluid(&self) -> bool {
|
||||||
match self {
|
match self {
|
||||||
BlockKind::Water => true,
|
BlockKind::Water => true,
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -123,7 +125,7 @@ impl BlockKind {
|
|||||||
BlockKind::LeafyPlant => false,
|
BlockKind::LeafyPlant => false,
|
||||||
BlockKind::Fern => false,
|
BlockKind::Fern => false,
|
||||||
BlockKind::DeadBush => false,
|
BlockKind::DeadBush => false,
|
||||||
BlockKind::Blueberry => false,
|
BlockKind::Blueberry => false,
|
||||||
_ => true,
|
_ => true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -159,6 +161,7 @@ impl BlockKind {
|
|||||||
BlockKind::Fern => false,
|
BlockKind::Fern => false,
|
||||||
BlockKind::DeadBush => false,
|
BlockKind::DeadBush => false,
|
||||||
BlockKind::Blueberry => false,
|
BlockKind::Blueberry => false,
|
||||||
|
BlockKind::Ember => false,
|
||||||
_ => true,
|
_ => true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -180,7 +183,7 @@ impl BlockKind {
|
|||||||
BlockKind::Velorite => true,
|
BlockKind::Velorite => true,
|
||||||
BlockKind::VeloriteFrag => true,
|
BlockKind::VeloriteFrag => true,
|
||||||
BlockKind::Chest => true,
|
BlockKind::Chest => true,
|
||||||
BlockKind::Pumpkin => true,
|
BlockKind::Pumpkin => true,
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -170,6 +170,10 @@ fn sprite_config_for(kind: BlockKind) -> Option<SpriteConfig> {
|
|||||||
variations: 4,
|
variations: 4,
|
||||||
wind_sway: 0.1,
|
wind_sway: 0.1,
|
||||||
}),
|
}),
|
||||||
|
BlockKind::Ember => Some(SpriteConfig {
|
||||||
|
variations: 1,
|
||||||
|
wind_sway: 4.0,
|
||||||
|
}),
|
||||||
|
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
@ -1066,6 +1070,14 @@ impl<V: RectRasterableVol> Terrain<V> {
|
|||||||
Vec3::new(-6.0, -6.0, -0.0),
|
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()
|
.into_iter()
|
||||||
.collect(),
|
.collect(),
|
||||||
|
@ -604,7 +604,7 @@ pub fn block_from_structure(
|
|||||||
StructureBlock::Fruit => Some(if field.get(pos + structure_pos) % 3 > 0 {
|
StructureBlock::Fruit => Some(if field.get(pos + structure_pos) % 3 > 0 {
|
||||||
Block::empty()
|
Block::empty()
|
||||||
} else {
|
} 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 {
|
StructureBlock::Chest => Some(if structure_seed % 10 < 7 {
|
||||||
Block::empty()
|
Block::empty()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user