mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Made ore streams mineable
This commit is contained in:
parent
f4af2e2589
commit
1b0cb40d94
@ -609,6 +609,11 @@ impl<const AVERAGE_PALETTE: bool> VoxelImageDecoding for TriPngEncoding<AVERAGE_
|
|||||||
g: 229,
|
g: 229,
|
||||||
b: 198,
|
b: 198,
|
||||||
},
|
},
|
||||||
|
GlowingWeakRock => Rgb {
|
||||||
|
r: 61,
|
||||||
|
g: 185,
|
||||||
|
b: 240,
|
||||||
|
},
|
||||||
Grass => Rgb {
|
Grass => Rgb {
|
||||||
r: 51,
|
r: 51,
|
||||||
g: 160,
|
g: 160,
|
||||||
|
@ -38,6 +38,7 @@ make_case_elim!(
|
|||||||
WeakRock = 0x11, // Explodable
|
WeakRock = 0x11, // Explodable
|
||||||
Lava = 0x12, // TODO: Reevaluate whether this should be in the rock section
|
Lava = 0x12, // TODO: Reevaluate whether this should be in the rock section
|
||||||
GlowingRock = 0x13,
|
GlowingRock = 0x13,
|
||||||
|
GlowingWeakRock = 0x14,
|
||||||
// 0x12 <= x < 0x20 is reserved for future rocks
|
// 0x12 <= x < 0x20 is reserved for future rocks
|
||||||
Grass = 0x20, // Note: *not* the same as grass sprites
|
Grass = 0x20, // Note: *not* the same as grass sprites
|
||||||
Snow = 0x21,
|
Snow = 0x21,
|
||||||
@ -168,7 +169,7 @@ impl Block {
|
|||||||
pub fn get_glow(&self) -> Option<u8> {
|
pub fn get_glow(&self) -> Option<u8> {
|
||||||
match self.kind() {
|
match self.kind() {
|
||||||
BlockKind::Lava => Some(24),
|
BlockKind::Lava => Some(24),
|
||||||
BlockKind::GlowingRock => Some(12),
|
BlockKind::GlowingRock | BlockKind::GlowingWeakRock => Some(12),
|
||||||
_ => match self.get_sprite()? {
|
_ => match self.get_sprite()? {
|
||||||
SpriteKind::StreetLamp | SpriteKind::StreetLampTall => Some(24),
|
SpriteKind::StreetLamp | SpriteKind::StreetLampTall => Some(24),
|
||||||
SpriteKind::Ember => Some(20),
|
SpriteKind::Ember => Some(20),
|
||||||
@ -272,7 +273,7 @@ impl Block {
|
|||||||
#[inline]
|
#[inline]
|
||||||
pub fn mine_tool(&self) -> Option<ToolKind> {
|
pub fn mine_tool(&self) -> Option<ToolKind> {
|
||||||
match self.kind() {
|
match self.kind() {
|
||||||
BlockKind::WeakRock => Some(ToolKind::Pick),
|
BlockKind::WeakRock | BlockKind::GlowingWeakRock => Some(ToolKind::Pick),
|
||||||
_ => self.get_sprite().and_then(|s| s.mine_tool()),
|
_ => self.get_sprite().and_then(|s| s.mine_tool()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -253,7 +253,7 @@ pub fn apply_caves_to(canvas: &mut Canvas, rng: &mut impl Rng) {
|
|||||||
canvas.set(
|
canvas.set(
|
||||||
Vec3::new(wpos2d.x, wpos2d.y, z),
|
Vec3::new(wpos2d.x, wpos2d.y, z),
|
||||||
Block::new(
|
Block::new(
|
||||||
BlockKind::GlowingRock,
|
BlockKind::GlowingWeakRock,
|
||||||
noisy_color(info.index().colors.layer.vein.into(), 16),
|
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(
|
canvas.set(
|
||||||
Vec3::new(wpos2d.x, wpos2d.y, z),
|
Vec3::new(wpos2d.x, wpos2d.y, z),
|
||||||
Block::new(
|
Block::new(
|
||||||
BlockKind::GlowingRock,
|
BlockKind::GlowingWeakRock,
|
||||||
noisy_color(info.index().colors.layer.vein.into(), 16),
|
noisy_color(info.index().colors.layer.vein.into(), 16),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user