mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Adresses some comments, various visual tweaks
This commit is contained in:
parent
02f446fe4b
commit
477bdfdfe7
BIN
assets/voxygen/voxel/sprite/furniture/sconce_wall-0.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/sprite/furniture/sconce_wall-0.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1793,6 +1793,18 @@ WallLampSmall: Some((
|
|||||||
wind_sway: 0.0,
|
wind_sway: 0.0,
|
||||||
)),
|
)),
|
||||||
|
|
||||||
|
// WallSconce
|
||||||
|
WallSconce: Some((
|
||||||
|
variations: [
|
||||||
|
(
|
||||||
|
model: "voxygen.voxel.sprite.furniture.sconce_wall-0",
|
||||||
|
offset: (-2.5, -1.5, 0.0),
|
||||||
|
lod_axes: (1.0, 1.0, 1.0),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
wind_sway: 0.0,
|
||||||
|
)),
|
||||||
|
|
||||||
// Planter
|
// Planter
|
||||||
Planter: Some((
|
Planter: Some((
|
||||||
variations: [
|
variations: [
|
||||||
|
@ -173,6 +173,7 @@ impl Block {
|
|||||||
SpriteKind::Ember => Some(20),
|
SpriteKind::Ember => Some(20),
|
||||||
SpriteKind::WallLamp => Some(16),
|
SpriteKind::WallLamp => Some(16),
|
||||||
SpriteKind::WallLampSmall => Some(16),
|
SpriteKind::WallLampSmall => Some(16),
|
||||||
|
SpriteKind::WallSconce => Some(16),
|
||||||
SpriteKind::FireBowlGround => Some(16),
|
SpriteKind::FireBowlGround => Some(16),
|
||||||
SpriteKind::Velorite | SpriteKind::VeloriteFrag => Some(6),
|
SpriteKind::Velorite | SpriteKind::VeloriteFrag => Some(6),
|
||||||
SpriteKind::CaveMushroom => Some(12),
|
SpriteKind::CaveMushroom => Some(12),
|
||||||
|
@ -127,6 +127,7 @@ make_case_elim!(
|
|||||||
EmeraldSmall = 0x64,
|
EmeraldSmall = 0x64,
|
||||||
SapphireSmall = 0x65,
|
SapphireSmall = 0x65,
|
||||||
WallLampSmall = 0x66,
|
WallLampSmall = 0x66,
|
||||||
|
WallSconce = 0x67,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -254,6 +255,7 @@ impl SpriteKind {
|
|||||||
| SpriteKind::HangingSign
|
| SpriteKind::HangingSign
|
||||||
| SpriteKind::WallLamp
|
| SpriteKind::WallLamp
|
||||||
| SpriteKind::WallLampSmall
|
| SpriteKind::WallLampSmall
|
||||||
|
| SpriteKind::WallSconce
|
||||||
| SpriteKind::Planter
|
| SpriteKind::Planter
|
||||||
| SpriteKind::Shelf
|
| SpriteKind::Shelf
|
||||||
| SpriteKind::TableSide
|
| SpriteKind::TableSide
|
||||||
|
@ -71,6 +71,7 @@ impl BlocksOfInterest {
|
|||||||
Some(SpriteKind::StreetLampTall) => {
|
Some(SpriteKind::StreetLampTall) => {
|
||||||
fire_bowls.push(pos + Vec3::unit_z() * 4)
|
fire_bowls.push(pos + Vec3::unit_z() * 4)
|
||||||
},
|
},
|
||||||
|
Some(SpriteKind::WallSconce) => fire_bowls.push(pos + Vec3::unit_z()),
|
||||||
Some(SpriteKind::Beehive) => beehives.push(pos),
|
Some(SpriteKind::Beehive) => beehives.push(pos),
|
||||||
Some(SpriteKind::Reed) => reeds.push(pos),
|
Some(SpriteKind::Reed) => reeds.push(pos),
|
||||||
Some(SpriteKind::PinkFlower) => flowers.push(pos),
|
Some(SpriteKind::PinkFlower) => flowers.push(pos),
|
||||||
|
@ -1208,7 +1208,7 @@ impl Floor {
|
|||||||
Some(Tile::Solid) => BlockMask::nothing(),
|
Some(Tile::Solid) => BlockMask::nothing(),
|
||||||
Some(Tile::Tunnel) => {
|
Some(Tile::Tunnel) => {
|
||||||
let light_offset: i32 = 7;
|
let light_offset: i32 = 7;
|
||||||
if (dist_to_wall - 4.0).abs() < f32::EPSILON
|
if (dist_to_wall - wall_thickness) as i32 == 1
|
||||||
&& rtile_pos
|
&& rtile_pos
|
||||||
.map(|e| e % light_offset == 0)
|
.map(|e| e % light_offset == 0)
|
||||||
.reduce(|x, y| x ^ y)
|
.reduce(|x, y| x ^ y)
|
||||||
@ -1216,8 +1216,7 @@ impl Floor {
|
|||||||
{
|
{
|
||||||
let ori =
|
let ori =
|
||||||
Floor::relative_ori(self.nearest_wall(rpos).unwrap_or_default(), rpos);
|
Floor::relative_ori(self.nearest_wall(rpos).unwrap_or_default(), rpos);
|
||||||
// NOTE: Used only for dynamic elements like chests and entities!
|
let furniture = SpriteKind::WallSconce;
|
||||||
let furniture = SpriteKind::WallLamp;
|
|
||||||
BlockMask::new(Block::air(furniture).with_ori(ori).unwrap(), 1)
|
BlockMask::new(Block::air(furniture).with_ori(ori).unwrap(), 1)
|
||||||
} else if dist_to_wall >= wall_thickness
|
} else if dist_to_wall >= wall_thickness
|
||||||
&& (z as f32) < tunnel_height * (1.0 - tunnel_dist.powi(4))
|
&& (z as f32) < tunnel_height * (1.0 - tunnel_dist.powi(4))
|
||||||
@ -1230,8 +1229,13 @@ impl Floor {
|
|||||||
Some(Tile::Room(room)) | Some(Tile::DownStair(room))
|
Some(Tile::Room(room)) | Some(Tile::DownStair(room))
|
||||||
if dist_to_wall < wall_thickness
|
if dist_to_wall < wall_thickness
|
||||||
|| z as f32
|
|| z as f32
|
||||||
>= self.rooms[*room].height as f32 * (1.0 - tunnel_dist.powi(4))
|
>= self.rooms[*room].height as f32 * (1.0 - tunnel_dist.powi(4)) =>
|
||||||
|| self.rooms[*room]
|
{
|
||||||
|
BlockMask::nothing()
|
||||||
|
},
|
||||||
|
|
||||||
|
Some(Tile::Room(room)) | Some(Tile::DownStair(room))
|
||||||
|
if self.rooms[*room]
|
||||||
.pillars
|
.pillars
|
||||||
.map(|pillar_space| {
|
.map(|pillar_space| {
|
||||||
tile_pos
|
tile_pos
|
||||||
@ -1241,8 +1245,22 @@ impl Floor {
|
|||||||
})
|
})
|
||||||
.unwrap_or(false) =>
|
.unwrap_or(false) =>
|
||||||
{
|
{
|
||||||
|
if z == 1 && rtile_pos.map(|e| e as f32).magnitude_squared() > 3.0f32.powi(2) {
|
||||||
|
let ori = Floor::relative_ori(
|
||||||
|
self.nearest_wall(rtile_pos).unwrap_or_default(),
|
||||||
|
rtile_pos,
|
||||||
|
);
|
||||||
|
let furniture = SpriteKind::WallSconce;
|
||||||
|
BlockMask::new(Block::air(furniture).with_ori(ori).unwrap(), 1)
|
||||||
|
} else if z < self.rooms[*room].height
|
||||||
|
&& rtile_pos.map(|e| e as f32).magnitude_squared() > 3.0f32.powi(2)
|
||||||
|
{
|
||||||
|
vacant
|
||||||
|
} else {
|
||||||
BlockMask::nothing()
|
BlockMask::nothing()
|
||||||
},
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Some(Tile::Room(_)) => {
|
Some(Tile::Room(_)) => {
|
||||||
let light_offset: i32 = 7;
|
let light_offset: i32 = 7;
|
||||||
if z == 0 {
|
if z == 0 {
|
||||||
@ -1253,9 +1271,11 @@ impl Floor {
|
|||||||
.reduce(|x, y| x ^ y)
|
.reduce(|x, y| x ^ y)
|
||||||
&& z == 1
|
&& z == 1
|
||||||
{
|
{
|
||||||
let ori =
|
let ori = Floor::relative_ori(
|
||||||
Floor::relative_ori(self.nearest_wall(rpos).unwrap_or_default(), rpos);
|
self.nearest_wall(rpos).unwrap_or_else(Vec2::zero),
|
||||||
let furniture = SpriteKind::WallLamp;
|
rpos,
|
||||||
|
);
|
||||||
|
let furniture = SpriteKind::WallSconce;
|
||||||
BlockMask::new(Block::air(furniture).with_ori(ori).unwrap(), 1)
|
BlockMask::new(Block::air(furniture).with_ori(ori).unwrap(), 1)
|
||||||
} else {
|
} else {
|
||||||
vacant
|
vacant
|
||||||
@ -1275,8 +1295,10 @@ impl Floor {
|
|||||||
stretch,
|
stretch,
|
||||||
);
|
);
|
||||||
let furniture = SpriteKind::WallLampSmall;
|
let furniture = SpriteKind::WallLampSmall;
|
||||||
let ori =
|
let ori = Floor::relative_ori(
|
||||||
Floor::relative_ori(self.nearest_wall(rtile_pos).unwrap_or_default(), rpos);
|
self.nearest_wall(rtile_pos).unwrap_or_else(Vec2::zero),
|
||||||
|
rpos,
|
||||||
|
);
|
||||||
if z < self.rooms[*room].height {
|
if z < self.rooms[*room].height {
|
||||||
block.resolve_with(vacant)
|
block.resolve_with(vacant)
|
||||||
} else if z as f32 % stretch == 0.0
|
} else if z as f32 % stretch == 0.0
|
||||||
|
Loading…
Reference in New Issue
Block a user