Made ore streams mineable

This commit is contained in:
Joshua Barretto 2021-09-01 12:05:00 +01:00
parent f4af2e2589
commit 1b0cb40d94
3 changed files with 10 additions and 4 deletions

View File

@ -609,6 +609,11 @@ impl<const AVERAGE_PALETTE: bool> VoxelImageDecoding for TriPngEncoding<AVERAGE_
g: 229,
b: 198,
},
GlowingWeakRock => Rgb {
r: 61,
g: 185,
b: 240,
},
Grass => Rgb {
r: 51,
g: 160,

View File

@ -38,6 +38,7 @@ make_case_elim!(
WeakRock = 0x11, // Explodable
Lava = 0x12, // TODO: Reevaluate whether this should be in the rock section
GlowingRock = 0x13,
GlowingWeakRock = 0x14,
// 0x12 <= x < 0x20 is reserved for future rocks
Grass = 0x20, // Note: *not* the same as grass sprites
Snow = 0x21,
@ -168,7 +169,7 @@ impl Block {
pub fn get_glow(&self) -> Option<u8> {
match self.kind() {
BlockKind::Lava => Some(24),
BlockKind::GlowingRock => Some(12),
BlockKind::GlowingRock | BlockKind::GlowingWeakRock => Some(12),
_ => match self.get_sprite()? {
SpriteKind::StreetLamp | SpriteKind::StreetLampTall => Some(24),
SpriteKind::Ember => Some(20),
@ -272,7 +273,7 @@ impl Block {
#[inline]
pub fn mine_tool(&self) -> Option<ToolKind> {
match self.kind() {
BlockKind::WeakRock => Some(ToolKind::Pick),
BlockKind::WeakRock | BlockKind::GlowingWeakRock => Some(ToolKind::Pick),
_ => self.get_sprite().and_then(|s| s.mine_tool()),
}
}

View File

@ -253,7 +253,7 @@ pub fn apply_caves_to(canvas: &mut Canvas, rng: &mut impl Rng) {
canvas.set(
Vec3::new(wpos2d.x, wpos2d.y, z),
Block::new(
BlockKind::GlowingRock,
BlockKind::GlowingWeakRock,
noisy_color(info.index().colors.layer.vein.into(), 16),
),
);
@ -265,7 +265,7 @@ pub fn apply_caves_to(canvas: &mut Canvas, rng: &mut impl Rng) {
canvas.set(
Vec3::new(wpos2d.x, wpos2d.y, z),
Block::new(
BlockKind::GlowingRock,
BlockKind::GlowingWeakRock,
noisy_color(info.index().colors.layer.vein.into(), 16),
),
);