mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'juliancoffee/not_explodable_sprites' into 'master'
Proof of concept non-explodable sprites See merge request veloren/veloren!2475
This commit is contained in:
commit
2abd23ec64
@ -21,7 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Removed
|
||||
|
||||
### Fixed
|
||||
|
||||
- Crafting Stations aren't exploadable anymore
|
||||
- Cases where no audio output could be produced before.
|
||||
- Significantly improved the performance of playing sound effects
|
||||
|
||||
|
@ -225,15 +225,24 @@ impl Block {
|
||||
/// arbitrary and only important when compared to one-another.
|
||||
#[inline]
|
||||
pub fn explode_power(&self) -> Option<f32> {
|
||||
// Explodable means that the terrain sprite will get removed anyway,
|
||||
// so all is good for empty fluids.
|
||||
match self.kind() {
|
||||
BlockKind::Leaves => Some(0.25),
|
||||
BlockKind::Grass => Some(0.5),
|
||||
BlockKind::WeakRock => Some(0.75),
|
||||
BlockKind::Snow => Some(0.1),
|
||||
// Explodable means that the terrain sprite will get removed anyway, so all is good for
|
||||
// empty fluids.
|
||||
// TODO: Handle the case of terrain sprites we don't want to have explode
|
||||
_ => self.get_sprite().map(|_| 0.25),
|
||||
_ => self.get_sprite().and_then(|sprite| match sprite {
|
||||
SpriteKind::Anvil
|
||||
| SpriteKind::Cauldron
|
||||
| SpriteKind::CookingPot
|
||||
| SpriteKind::CraftingBench
|
||||
| SpriteKind::Forge
|
||||
| SpriteKind::Loom
|
||||
| SpriteKind::SpinningWheel
|
||||
| SpriteKind::TanningRack => None,
|
||||
_ => Some(0.25),
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user