Add Chrismas wreath (25% chance) and make the towns go wild with illumination

This commit is contained in:
Christof Petig 2021-12-14 13:26:53 -06:00 committed by Joshua Barretto
parent 3edc7b5846
commit cbd2a422f3
3 changed files with 28 additions and 6 deletions

View File

@ -2030,6 +2030,16 @@ ChristmasOrnament: Some((
],
wind_sway: 0.2,
)),
ChristmasWreath: Some((
variations: [
(
model: "voxygen.voxel.sprite.furniture.wreath-0",
offset: (-6.5, -4.5, 0.0),
lod_axes: (1.0, 1.0, 1.0),
),
],
wind_sway: 0.0,
)),
// WallSconce
WallSconce: Some((
variations: [

View File

@ -189,6 +189,7 @@ make_case_elim!(
JungleRedGrass = 0xA2,
Bomb = 0xA3,
ChristmasOrnament = 0xA4,
ChristmasWreath = 0xA5,
}
);
@ -453,6 +454,7 @@ impl SpriteKind {
| SpriteKind::Loom
| SpriteKind::DismantlingBench
| SpriteKind::ChristmasOrnament
| SpriteKind::ChristmasWreath
)
}
}

View File

@ -7,7 +7,7 @@ use crate::{
IndexRef,
};
use common::{
calendar::Calendar,
calendar::{Calendar, CalendarEvent},
make_case_elim,
terrain::{Block, BlockKind, SpriteKind},
};
@ -241,7 +241,9 @@ impl Archetype for House {
noise: RandomField::new(rng.gen()),
roof_ribbing: rng.gen(),
roof_ribbing_diagonal: rng.gen(),
christmas_decorations: calendar.map(|c| c.is_event(CalendarEvent::Christmas)),
christmas_decorations: calendar
.map(|c| c.is_event(CalendarEvent::Christmas))
.unwrap_or_default(),
};
(this, skel)
@ -612,13 +614,21 @@ impl Archetype for House {
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)
&& self.noise.chance(
Vec3::new(center_offset.x, center_offset.y, z),
if christmas_theme { 0.70 } else { 0.35 },
)
&& attr.storey_fill.has_lower()
{
let ornament = if christmas_theme {
SpriteKind::ChristmasOrnament
match self
.noise
.get(Vec3::new(center_offset.x, center_offset.y, z + 100))
% 4
{
0 => SpriteKind::ChristmasWreath,
_ => SpriteKind::ChristmasOrnament,
}
} else {
match self
.noise