Added decals to towns

This commit is contained in:
Joshua Barretto 2020-08-12 14:19:26 +01:00
parent 6992194ad4
commit 15b1717295
6 changed files with 63 additions and 15 deletions

View File

@ -7,17 +7,14 @@
(1, "common.items.food.coconut"),
// miscellaneous
(0.4, "common.items.ore.velorite"),
(0.6, "common.items.ore.veloritefrag"),
(0.6, "common.items.ore.veloritefrag"),
(0.1, "common.items.consumable.potion_minor"),
(0.01, "common.items.utility.collar"),
(0.01, "common.items.utility.bomb_pile"),
(0.1, "common.items.utility.bomb"),
// crafting ingredients
(0.5, "common.items.crafting_ing.shiny_gem"),
(2, "common.items.crafting_ing.leather_scraps"),
(1, "common.items.crafting_ing.empty_vial"),
(2, "common.items.crafting_ing.stones"),
(3, "common.items.crafting_ing.twigs"),
// swords
(0.1, "common.items.weapons.sword.starter_sword"),
(0.1, "common.items.weapons.sword.wood_sword"),
@ -137,7 +134,7 @@
// belts
(0.17, "common.items.armor.belt.cloth_blue_0"),
(0.17, "common.items.armor.belt.cloth_green_0"),
(0.17, "common.items.armor.belt.cloth_purple_0"),
(0.17, "common.items.armor.belt.cloth_purple_0"),
(0.08, "common.items.armor.belt.druid"),
(0.06, "common.items.armor.belt.leather_0"),
(0.06, "common.items.armor.belt.leather_2"),
@ -159,7 +156,7 @@
(0.025, "common.items.armor.chest.worker_red_0"),
(0.025, "common.items.armor.chest.worker_red_1"),
(0.025, "common.items.armor.chest.worker_yellow_0"),
(0.025, "common.items.armor.chest.worker_yellow_1"),
(0.025, "common.items.armor.chest.worker_yellow_1"),
(0.08, "common.items.armor.chest.druid"),
(0.06, "common.items.armor.chest.leather_0"),
(0.06, "common.items.armor.chest.leather_2"),
@ -171,7 +168,7 @@
// shoes
(0.15, "common.items.armor.foot.cloth_blue_0"),
(0.15, "common.items.armor.foot.cloth_green_0"),
(0.15, "common.items.armor.foot.cloth_purple_0"),
(0.15, "common.items.armor.foot.cloth_purple_0"),
(0.08, "common.items.armor.foot.druid"),
(0.06, "common.items.armor.foot.leather_0"),
(0.06, "common.items.armor.foot.leather_2"),
@ -184,7 +181,7 @@
(0.125, "common.items.armor.pants.cloth_blue_0"),
(0.125, "common.items.armor.pants.cloth_green_0"),
(0.125, "common.items.armor.pants.cloth_purple_0"),
(0.125, "common.items.armor.pants.worker_blue_0"),
(0.125, "common.items.armor.pants.worker_blue_0"),
(0.08, "common.items.armor.pants.druid"),
(0.04, "common.items.armor.pants.leather_0"),
(0.04, "common.items.armor.pants.leather_2"),
@ -198,7 +195,7 @@
(0.125, "common.items.armor.shoulder.cloth_blue_0"),
(0.125, "common.items.armor.shoulder.cloth_blue_1"),
(0.125, "common.items.armor.shoulder.cloth_green_0"),
(0.125, "common.items.armor.shoulder.cloth_purple_0"),
(0.125, "common.items.armor.shoulder.cloth_purple_0"),
(0.06, "common.items.armor.shoulder.druidshoulder"),
(0.06, "common.items.armor.shoulder.leather_strips"),
(0.04, "common.items.armor.shoulder.leather_0"),
@ -217,7 +214,7 @@
//gloves
(0.17, "common.items.armor.hand.cloth_blue_0"),
(0.17, "common.items.armor.hand.cloth_green_0"),
(0.17, "common.items.armor.hand.cloth_purple_0"),
(0.17, "common.items.armor.hand.cloth_purple_0"),
(0.08, "common.items.armor.hand.druid"),
(0.06, "common.items.armor.hand.leather_0"),
(0.06, "common.items.armor.hand.leather_2"),

View File

@ -116,6 +116,8 @@ impl EntityInfo {
},
Body::Dragon(body) => Some(get_npc_name(&NPC_NAMES.dragon, body.species)),
Body::QuadrupedLow(body) => Some(get_npc_name(&NPC_NAMES.quadruped_low, body.species)),
Body::Golem(body) => Some(get_npc_name(&NPC_NAMES.golem, body.species)),
Body::BipedLarge(body) => Some(get_npc_name(&NPC_NAMES.biped_large, body.species)),
_ => None,
}
.map(|s| {

View File

@ -381,7 +381,8 @@ impl BlockKind {
pub fn is_explodable(&self) -> bool {
match self {
BlockKind::Leaves | BlockKind::Grass | BlockKind::Rock | BlockKind::GrassSnow => true,
_ => false,
BlockKind::Air => false,
bk => bk.is_air(), // Temporary catch for terrain sprites
}
}

View File

@ -2482,7 +2482,7 @@ impl<V: RectRasterableVol> Terrain<V> {
(BlockKind::HangingSign, 0),
make_models(
"voxygen.voxel.sprite.furniture.hanging_sign-0",
Vec3::new(-3.5, -17.0, 0.0),
Vec3::new(-3.5, -28.0, -4.0),
Vec3::one(),
),
),

View File

@ -54,7 +54,7 @@ const WALL_COLORS: &[Rgb<u8>] = &[
Rgb::new(0xE1, 0xAB, 0x91),
Rgb::new(0x82, 0x57, 0x4C),
Rgb::new(0xB9, 0x96, 0x77),
Rgb::new(0x6E, 0x4D, 0x3C),
Rgb::new(0xAE, 0x8D, 0x9C),
];
const SUPPORT_COLORS: &[Rgb<u8>] = &[
@ -292,6 +292,13 @@ impl Archetype for House {
let foundation_height = 0 - (dist - width - 1).max(0);
let roof_top = storey_height * attr.levels + 2 + width;
let edge_ori = if bound_offset.x.abs() > bound_offset.y.abs() {
if center_offset.x > 0 { 6 } else { 2 }
} else {
if (center_offset.y > 0) ^ (ori == Ori::East) { 0 } else { 4 }
};
let edge_ori = if ori == Ori::East { (edge_ori + 2) % 8 } else { edge_ori };
if let Pillar::Chimney(chimney_height) = attr.pillar {
let chimney_top = roof_top + chimney_height;
// Chimney shaft
@ -480,12 +487,48 @@ impl Archetype for House {
|| (!attr.storey_fill.has_upper() && profile.y >= ceil_height)
{
return Some(empty);
// Furniture
} else if dist == width - 1
&& center_offset.sum() % 2 == 0
&& profile.y == floor_height + 1
&& self.noise.chance(Vec3::new(center_offset.x, center_offset.y, z), 0.2)
{
let furniture = match self.noise.get(Vec3::new(center_offset.x, center_offset.y, z + 100)) % 11 {
0 => BlockKind::Planter,
1 => BlockKind::ChairSingle,
2 => BlockKind::ChairDouble,
3 => BlockKind::CoatRack,
4 => BlockKind::Crate,
6 => BlockKind::DrawerMedium,
7 => BlockKind::DrawerSmall,
8 => BlockKind::TableSide,
9 => BlockKind::WardrobeSingle,
_ => BlockKind::Pot,
};
return Some(BlockMask::new(Block::new(furniture, Rgb::new(edge_ori, 0, 0)), internal_layer));
} else {
return Some(internal);
}
}
None
// Wall ornaments
if dist == width + 1
&& center_offset.map(|e| e.abs()).reduce_min() == 0
&& profile.y == floor_height + 3
&& self.noise.chance(Vec3::new(center_offset.x, center_offset.y, z), 0.35)
&& attr.storey_fill.has_lower()
{
let ornament = match self.noise.get(Vec3::new(center_offset.x, center_offset.y, z + 100)) % 4 {
0 => BlockKind::HangingSign,
1 | 2 => BlockKind::HangingBasket,
_ => BlockKind::DungeonWallDecor,
};
return Some(BlockMask::new(Block::new(ornament, Rgb::new((edge_ori + 4) % 8, 0, 0)), internal_layer));
} else {
None
}
};
let mut cblock = empty;

View File

@ -746,11 +746,16 @@ impl Settlement {
for z in -8 - diff..3 + diff {
let pos = Vec3::new(offs.x, offs.y, surface_z + z);
let block = vol.get(pos).ok().copied().unwrap_or(Block::empty());
if block.is_empty() {
break;
}
if let (0, Some(block)) = (z, surface_block) {
let _ = vol.set(pos, block);
} else if z >= 0 {
if vol.get(pos).unwrap().kind() != BlockKind::Water {
if block.kind() != BlockKind::Water {
let _ = vol.set(pos, Block::empty());
}
} else {