drop gate parts

This commit is contained in:
Pfauenauge 2020-07-31 01:18:33 +02:00 committed by Joshua Barretto
parent a966841c5a
commit ee83479748
4 changed files with 42 additions and 0 deletions

BIN
assets/voxygen/voxel/sprite/castle/drop_gate_bars-0.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/sprite/castle/drop_gate_bottom-0.vox (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -88,6 +88,8 @@ pub enum BlockKind {
Stones, Stones,
Twigs, Twigs,
ShinyGem, ShinyGem,
DropGate,
DropGateBottom,
} }
impl fmt::Display for BlockKind { impl fmt::Display for BlockKind {
@ -191,6 +193,8 @@ impl BlockKind {
BlockKind::Stones => true, BlockKind::Stones => true,
BlockKind::Twigs => true, BlockKind::Twigs => true,
BlockKind::ShinyGem => true, BlockKind::ShinyGem => true,
BlockKind::DropGate => false,
BlockKind::DropGateBottom => false,
_ => false, _ => false,
} }
} }
@ -288,6 +292,8 @@ impl BlockKind {
BlockKind::Stones => false, BlockKind::Stones => false,
BlockKind::Twigs => false, BlockKind::Twigs => false,
BlockKind::ShinyGem => false, BlockKind::ShinyGem => false,
BlockKind::DropGate => false,
BlockKind::DropGateBottom => false,
_ => true, _ => true,
} }
} }
@ -362,6 +368,8 @@ impl BlockKind {
BlockKind::Stones => false, BlockKind::Stones => false,
BlockKind::Twigs => false, BlockKind::Twigs => false,
BlockKind::ShinyGem => false, BlockKind::ShinyGem => false,
BlockKind::DropGate => true,
BlockKind::DropGateBottom => false,
_ => true, _ => true,
} }
} }
@ -486,7 +494,10 @@ impl Block {
| BlockKind::WardrobeSingle | BlockKind::WardrobeSingle
| BlockKind::WardrobeDouble | BlockKind::WardrobeDouble
| BlockKind::Pot | BlockKind::Pot
| BlockKind::DropGate
| BlockKind::DropGateBottom
| BlockKind::Door => Some(self.color[0] & 0b111), | BlockKind::Door => Some(self.color[0] & 0b111),
_ => None, _ => None,
} }
} }

View File

@ -350,6 +350,14 @@ fn sprite_config_for(kind: BlockKind) -> Option<SpriteConfig> {
variations: 3, variations: 3,
wind_sway: 0.0, wind_sway: 0.0,
}), }),
BlockKind::DropGate => Some(SpriteConfig {
variations: 1,
wind_sway: 0.0,
}),
BlockKind::DropGateBottom => Some(SpriteConfig {
variations: 1,
wind_sway: 0.0,
}),
_ => None, _ => None,
} }
} }
@ -2733,6 +2741,23 @@ impl<V: RectRasterableVol> Terrain<V> {
Vec3::one(), Vec3::one(),
), ),
), ),
// Drop Gate Parts
(
(BlockKind::DropGate, 0),
make_models(
"voxygen.voxel.sprite.castle.drop_gate_bars-0",
Vec3::new(-5.5, -5.5, 0.0),
Vec3::one(),
),
),
(
(BlockKind::DropGateBottom, 0),
make_models(
"voxygen.voxel.sprite.castle.drop_gate_bottom-0",
Vec3::new(-5.5, -5.5, 0.0),
Vec3::one(),
),
),
] ]
.into_iter() .into_iter()
.collect(), .collect(),