diff --git a/assets/server/manifests/ship_manifest.ron b/assets/server/manifests/ship_manifest.ron index 36184ce50f..390f1cc11f 100644 --- a/assets/server/manifests/ship_manifest.ron +++ b/assets/server/manifests/ship_manifest.ron @@ -69,4 +69,26 @@ central: ("empty"), ), ), + Galleon: ( + bone0: ( + offset: (-16, -16, -3.0), + phys_offset: (0.0, 0.0, 0.0), + central: ("galleon.structure"), + ), + bone1: ( + offset: (0.0, 0.0, 0.0), + phys_offset: (0.0, 0.0, 0.0), + central: ("empty"), + ), + bone2: ( + offset: (0.0, 0.0, 0.0), + phys_offset: (0.0, 0.0, 0.0), + central: ("empty"), + ), + bone3: ( + offset: (0.0, 0.0, 0.0), + phys_offset: (0.0, 0.0, 0.0), + central: ("empty"), + ), + ), }) diff --git a/assets/server/voxel/galleon/structure.vox b/assets/server/voxel/galleon/structure.vox new file mode 100644 index 0000000000..b101f7ecdc Binary files /dev/null and b/assets/server/voxel/galleon/structure.vox differ diff --git a/assets/world/manifests/shrubs/jungle.ron b/assets/world/manifests/shrubs/jungle.ron index 594c8e4d22..7942d8d38d 100644 --- a/assets/world/manifests/shrubs/jungle.ron +++ b/assets/world/manifests/shrubs/jungle.ron @@ -1,10 +1,6 @@ #![enable(unwrap_newtypes)] [ - ( - specifier: "world.shrub.1", - center: (6, 6, 2), - ), ( specifier: "world.shrub.jungle.bush-0", center: (5, 5, 3), diff --git a/assets/world/manifests/shrubs/savannah.ron b/assets/world/manifests/shrubs/savannah.ron new file mode 100644 index 0000000000..0a634919f2 --- /dev/null +++ b/assets/world/manifests/shrubs/savannah.ron @@ -0,0 +1,44 @@ +#![enable(unwrap_newtypes)] + +[ + ( + specifier: "world.shrub.savannah.bush-0", + center: (5, 3, 8), + ), + ( + specifier: "world.shrub.savannah.bush-1", + center: (5, 6, 6), + ), + ( + specifier: "world.shrub.savannah.bush-2", + center: (4, 4, 3), + ), + ( + specifier: "world.shrub.savannah.bush-3", + center: (5, 6, 3), + ), + ( + specifier: "world.shrub.savannah.bush-4", + center: (7, 7, 5), + ), + ( + specifier: "world.shrub.savannah.bush-5", + center: (4, 5, 4), + ), + ( + specifier: "world.shrub.savannah.bush-6", + center: (3, 3, 3), + ), + ( + specifier: "world.shrub.savannah.bush-7", + center: (3, 3, 3), + ), + ( + specifier: "world.shrub.savannah.bush-8", + center: (2, 2, 3), + ), + ( + specifier: "world.shrub.savannah.bush-9", + center: (4, 3, 3), + ), +] diff --git a/assets/world/manifests/shrubs/taiga.ron b/assets/world/manifests/shrubs/taiga.ron new file mode 100644 index 0000000000..cef20b3f58 --- /dev/null +++ b/assets/world/manifests/shrubs/taiga.ron @@ -0,0 +1,28 @@ +#![enable(unwrap_newtypes)] + +[ + ( + specifier: "world.shrub.taiga.bush-0", + center: (4, 4, 3), + ), + ( + specifier: "world.shrub.taiga.bush-1", + center: (4, 4, 3), + ), + ( + specifier: "world.shrub.taiga.bush-2", + center: (4, 4, 3), + ), + ( + specifier: "world.shrub.taiga.bush-3", + center: (4, 4, 2), + ), + ( + specifier: "world.shrub.taiga.bush-4", + center: (3, 3, 2), + ), + ( + specifier: "world.shrub.taiga.bush-5", + center: (4, 4, 2), + ), +] diff --git a/assets/world/manifests/shrubs/temperate.ron b/assets/world/manifests/shrubs/temperate.ron new file mode 100644 index 0000000000..078d47f58d --- /dev/null +++ b/assets/world/manifests/shrubs/temperate.ron @@ -0,0 +1,24 @@ +#![enable(unwrap_newtypes)] + +[ + ( + specifier: "world.shrub.temperate.bush-0", + center: (4, 4, 2), + ), + ( + specifier: "world.shrub.temperate.bush-1", + center: (3, 3, 2), + ), + ( + specifier: "world.shrub.temperate.bush-2", + center: (4, 4, 2), + ), + ( + specifier: "world.shrub.temperate.bush-3", + center: (4, 4, 2), + ), + ( + specifier: "world.shrub.temperate.bush-4", + center: (5, 5, 3), + ), +] diff --git a/assets/world/manifests/spots/water/shipwreck2.ron b/assets/world/manifests/spots/water/shipwreck2.ron new file mode 100644 index 0000000000..9ae113001d --- /dev/null +++ b/assets/world/manifests/spots/water/shipwreck2.ron @@ -0,0 +1,12 @@ +#![enable(unwrap_newtypes)] + +[ + ( + specifier: "world.structure.natural.shipwreck2", + center: (32, 31, 14), + /// ( X, Y, Z, ) + custom_indices: { + 48: Sprite(Chest), + }, + ), +] diff --git a/assets/world/manifests/spots_general/troll_cave.ron b/assets/world/manifests/spots_general/troll_cave.ron new file mode 100644 index 0000000000..2461241f24 --- /dev/null +++ b/assets/world/manifests/spots_general/troll_cave.ron @@ -0,0 +1,9 @@ +#![enable(unwrap_newtypes)] + +[ + ( + specifier: "world.structure.natural.troll_cave", + center: (23, 25, 12), + /// ( X, Y, Z, ) + ), +] diff --git a/assets/world/manifests/spots_grasslands/gnarling_tree.ron b/assets/world/manifests/spots_grasslands/gnarling_tree.ron new file mode 100644 index 0000000000..b161e03ffa --- /dev/null +++ b/assets/world/manifests/spots_grasslands/gnarling_tree.ron @@ -0,0 +1,12 @@ +#![enable(unwrap_newtypes)] + +[ + ( + specifier: "world.structure.natural.gnarling_tree", + center: (32, 28, 15), + /// ( X, Y, Z, ) + custom_indices: { + 48: Sprite(Chest), + }, + ), +] diff --git a/assets/world/shrub/1.vox b/assets/world/shrub/1.vox deleted file mode 100644 index 3291e72b2a..0000000000 Binary files a/assets/world/shrub/1.vox and /dev/null differ diff --git a/assets/world/shrub/savannah/bush-0.vox b/assets/world/shrub/savannah/bush-0.vox new file mode 100644 index 0000000000..e3f3cf4c5c Binary files /dev/null and b/assets/world/shrub/savannah/bush-0.vox differ diff --git a/assets/world/shrub/savannah/bush-1.vox b/assets/world/shrub/savannah/bush-1.vox new file mode 100644 index 0000000000..4ad5f1ddee Binary files /dev/null and b/assets/world/shrub/savannah/bush-1.vox differ diff --git a/assets/world/shrub/savannah/bush-2.vox b/assets/world/shrub/savannah/bush-2.vox new file mode 100644 index 0000000000..ad436c110f Binary files /dev/null and b/assets/world/shrub/savannah/bush-2.vox differ diff --git a/assets/world/shrub/savannah/bush-3.vox b/assets/world/shrub/savannah/bush-3.vox new file mode 100644 index 0000000000..58863a2177 Binary files /dev/null and b/assets/world/shrub/savannah/bush-3.vox differ diff --git a/assets/world/shrub/savannah/bush-4.vox b/assets/world/shrub/savannah/bush-4.vox new file mode 100644 index 0000000000..c81709f6fb Binary files /dev/null and b/assets/world/shrub/savannah/bush-4.vox differ diff --git a/assets/world/shrub/savannah/bush-5.vox b/assets/world/shrub/savannah/bush-5.vox new file mode 100644 index 0000000000..c12db084c3 Binary files /dev/null and b/assets/world/shrub/savannah/bush-5.vox differ diff --git a/assets/world/shrub/savannah/bush-6.vox b/assets/world/shrub/savannah/bush-6.vox new file mode 100644 index 0000000000..f00a9fc7be Binary files /dev/null and b/assets/world/shrub/savannah/bush-6.vox differ diff --git a/assets/world/shrub/savannah/bush-7.vox b/assets/world/shrub/savannah/bush-7.vox new file mode 100644 index 0000000000..fb04e4c737 Binary files /dev/null and b/assets/world/shrub/savannah/bush-7.vox differ diff --git a/assets/world/shrub/savannah/bush-8.vox b/assets/world/shrub/savannah/bush-8.vox new file mode 100644 index 0000000000..3d64f79f4e Binary files /dev/null and b/assets/world/shrub/savannah/bush-8.vox differ diff --git a/assets/world/shrub/savannah/bush-9.vox b/assets/world/shrub/savannah/bush-9.vox new file mode 100644 index 0000000000..23bfeb91f8 Binary files /dev/null and b/assets/world/shrub/savannah/bush-9.vox differ diff --git a/assets/world/shrub/taiga/bush-0.vox b/assets/world/shrub/taiga/bush-0.vox new file mode 100644 index 0000000000..f7ee7f0a46 Binary files /dev/null and b/assets/world/shrub/taiga/bush-0.vox differ diff --git a/assets/world/shrub/taiga/bush-1.vox b/assets/world/shrub/taiga/bush-1.vox new file mode 100644 index 0000000000..357ed1fbcf Binary files /dev/null and b/assets/world/shrub/taiga/bush-1.vox differ diff --git a/assets/world/shrub/taiga/bush-2.vox b/assets/world/shrub/taiga/bush-2.vox new file mode 100644 index 0000000000..2fc68dd466 Binary files /dev/null and b/assets/world/shrub/taiga/bush-2.vox differ diff --git a/assets/world/shrub/taiga/bush-3.vox b/assets/world/shrub/taiga/bush-3.vox new file mode 100644 index 0000000000..ad989ec8ae Binary files /dev/null and b/assets/world/shrub/taiga/bush-3.vox differ diff --git a/assets/world/shrub/taiga/bush-4.vox b/assets/world/shrub/taiga/bush-4.vox new file mode 100644 index 0000000000..b3e089fb4e Binary files /dev/null and b/assets/world/shrub/taiga/bush-4.vox differ diff --git a/assets/world/shrub/taiga/bush-5.vox b/assets/world/shrub/taiga/bush-5.vox new file mode 100644 index 0000000000..8918ca6d33 Binary files /dev/null and b/assets/world/shrub/taiga/bush-5.vox differ diff --git a/assets/world/shrub/temperate/bush-0.vox b/assets/world/shrub/temperate/bush-0.vox new file mode 100644 index 0000000000..0f56b3454e Binary files /dev/null and b/assets/world/shrub/temperate/bush-0.vox differ diff --git a/assets/world/shrub/temperate/bush-1.vox b/assets/world/shrub/temperate/bush-1.vox new file mode 100644 index 0000000000..5e3ab6fa16 Binary files /dev/null and b/assets/world/shrub/temperate/bush-1.vox differ diff --git a/assets/world/shrub/temperate/bush-2.vox b/assets/world/shrub/temperate/bush-2.vox new file mode 100644 index 0000000000..c7d1a5e6e5 Binary files /dev/null and b/assets/world/shrub/temperate/bush-2.vox differ diff --git a/assets/world/shrub/temperate/bush-3.vox b/assets/world/shrub/temperate/bush-3.vox new file mode 100644 index 0000000000..877ae193a4 Binary files /dev/null and b/assets/world/shrub/temperate/bush-3.vox differ diff --git a/assets/world/shrub/temperate/bush-4.vox b/assets/world/shrub/temperate/bush-4.vox new file mode 100644 index 0000000000..2addc0c9c2 Binary files /dev/null and b/assets/world/shrub/temperate/bush-4.vox differ diff --git a/assets/world/structure/natural/gnarling_tree.vox b/assets/world/structure/natural/gnarling_tree.vox new file mode 100644 index 0000000000..13ce519ab6 Binary files /dev/null and b/assets/world/structure/natural/gnarling_tree.vox differ diff --git a/assets/world/structure/natural/shipwreck2.vox b/assets/world/structure/natural/shipwreck2.vox new file mode 100644 index 0000000000..d4ddf2c9c4 Binary files /dev/null and b/assets/world/structure/natural/shipwreck2.vox differ diff --git a/assets/world/structure/natural/troll_cave.vox b/assets/world/structure/natural/troll_cave.vox new file mode 100644 index 0000000000..ce3647cc1b Binary files /dev/null and b/assets/world/structure/natural/troll_cave.vox differ diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index b5a288399b..c4d9a1991c 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -857,6 +857,7 @@ impl Body { ship::Body::DefaultAirship => [0.0, 0.0, 10.0], ship::Body::AirBalloon => [0.0, 0.0, 5.0], ship::Body::SailBoat => [-2.0, -5.0, 4.0], + ship::Body::Galleon => [-2.0, -5.0, 4.0], }, _ => [0.0, 0.0, 0.0], } diff --git a/common/src/comp/body/ship.rs b/common/src/comp/body/ship.rs index 1c3a28570b..de09ef9a08 100644 --- a/common/src/comp/body/ship.rs +++ b/common/src/comp/body/ship.rs @@ -7,7 +7,12 @@ use rand::prelude::SliceRandom; use serde::{Deserialize, Serialize}; use vek::Vec3; -pub const ALL_BODIES: [Body; 3] = [Body::DefaultAirship, Body::AirBalloon, Body::SailBoat]; +pub const ALL_BODIES: [Body; 4] = [ + Body::DefaultAirship, + Body::AirBalloon, + Body::SailBoat, + Body::Galleon, +]; make_case_elim!( body, @@ -17,6 +22,7 @@ make_case_elim!( DefaultAirship = 0, AirBalloon = 1, SailBoat = 2, + Galleon = 3, } ); @@ -37,6 +43,7 @@ impl Body { Body::DefaultAirship => "airship_human.structure", Body::AirBalloon => "air_balloon.structure", Body::SailBoat => "sail_boat.structure", + Body::Galleon => "galleon.structure", } } @@ -45,6 +52,7 @@ impl Body { Body::DefaultAirship => Vec3::new(25.0, 50.0, 40.0), Body::AirBalloon => Vec3::new(25.0, 50.0, 40.0), Body::SailBoat => Vec3::new(13.0, 31.0, 3.0), + Body::Galleon => Vec3::new(13.0, 31.0, 3.0), //replace with real vectors in a sec } } diff --git a/common/src/states/utils.rs b/common/src/states/utils.rs index da1ec5d8a8..039157f7a0 100644 --- a/common/src/states/utils.rs +++ b/common/src/states/utils.rs @@ -202,7 +202,7 @@ impl Body { Body::QuadrupedLow(_) => Some(300.0 * self.mass().0), Body::QuadrupedMedium(_) => Some(300.0 * self.mass().0), Body::QuadrupedSmall(_) => Some(300.0 * self.mass().0), - Body::Ship(ship) if ship.has_water_thrust() => Some(1500.0 * self.mass().0), + Body::Ship(ship) if ship.has_water_thrust() => Some(3500.0 * self.mass().0), Body::Ship(_) => None, } } diff --git a/voxygen/anim/src/ship/mod.rs b/voxygen/anim/src/ship/mod.rs index a1afe338fa..5a32b68326 100644 --- a/voxygen/anim/src/ship/mod.rs +++ b/voxygen/anim/src/ship/mod.rs @@ -94,21 +94,25 @@ impl<'a> From<&'a Body> for SkeletonAttr { DefaultAirship => (0.0, 0.0, 0.0), AirBalloon => (0.0, 0.0, 0.0), SailBoat => (0.0, 0.0, 0.0), + Galleon => (0.0, 0.0, 0.0), }, bone1: match body { DefaultAirship => (-13.0, -25.0, 10.0), AirBalloon => (0.0, 0.0, 0.0), SailBoat => (0.0, 0.0, 0.0), + Galleon => (0.0, 0.0, 0.0), }, bone2: match body { DefaultAirship => (13.0, -25.0, 10.0), AirBalloon => (0.0, 0.0, 0.0), SailBoat => (0.0, 0.0, 0.0), + Galleon => (0.0, 0.0, 0.0), }, bone3: match body { DefaultAirship => (0.0, -27.5, 8.5), AirBalloon => (0.0, -9.0, 8.0), SailBoat => (0.0, 0.0, 0.0), + Galleon => (0.0, 0.0, 0.0), }, } } diff --git a/world/src/layer/shrub.rs b/world/src/layer/shrub.rs index 6f054354a2..2c7de9a67b 100644 --- a/world/src/layer/shrub.rs +++ b/world/src/layer/shrub.rs @@ -15,6 +15,11 @@ use vek::*; lazy_static! { static ref JUNGLE_SHRUBS: AssetHandle = Structure::load_group("shrubs.jungle"); + static ref SAVANNAH_SHRUBS: AssetHandle = + Structure::load_group("shrubs.savannah"); + static ref TEMPERATE_SHRUBS: AssetHandle = + Structure::load_group("shrubs.temperate"); + static ref TAIGA_SHRUBS: AssetHandle = Structure::load_group("shrubs.taiga"); } struct Shrub { @@ -65,7 +70,10 @@ pub fn apply_shrubs_to(canvas: &mut Canvas, _dynamic_rng: &mut impl Rng) { let units = UnitChooser::new(shrub.seed).get(shrub.seed).into(); let shrubs = match shrub.kind { - ForestKind::Mangrove => &JUNGLE_SHRUBS, + ForestKind::Mangrove => &*JUNGLE_SHRUBS, + ForestKind::Acacia | ForestKind::Baobab => &*SAVANNAH_SHRUBS, + ForestKind::Oak | ForestKind::Chestnut => &*TEMPERATE_SHRUBS, + ForestKind::Pine => &*TAIGA_SHRUBS, _ => continue, // TODO: Add more shrub varieties } .read(); diff --git a/world/src/layer/spot.rs b/world/src/layer/spot.rs index 1a3590a1dd..6e5276ba2d 100644 --- a/world/src/layer/spot.rs +++ b/world/src/layer/spot.rs @@ -46,7 +46,6 @@ pub enum Spot { //TowerRuin, //WellOfLight, //MerchantOutpost, - //TrollHideout, //RuinedHuntingCabin, <-- Bears! //LionRock, //WolfBurrow, @@ -58,6 +57,9 @@ pub enum Spot { AirshipCrash, FruitTree, Shipwreck, + Shipwreck2, + GnarlingTree, + TrollCave, } impl Spot { @@ -179,6 +181,34 @@ impl Spot { }, false, ); + Self::generate_spots( + Spot::GnarlingTree, + world, + 1.0, + |g, c| { + g < 0.25 + && !c.near_cliffs() + && !c.river.near_water() + && !c.path.0.is_way() + && c.sites.is_empty() + && matches!(c.get_biome(), Forest | Grassland) + }, + false, + ); + Self::generate_spots( + Spot::TrollCave, + world, + 1.0, + |g, c| { + g < 0.25 + && !c.near_cliffs() + && !c.river.near_water() + && !c.path.0.is_way() + && c.sites.is_empty() + && matches!(c.get_biome(), Forest | Grassland | Snowland | Taiga) + }, + false, + ); // Random World Objects -> Themed to their Biome and the NPCs that regularly // spawn there Self::generate_spots( @@ -296,7 +326,16 @@ impl Spot { Self::generate_spots( Spot::Shipwreck, world, - 2.0, + 1.0, + |g, c| { + g < 0.25 && c.is_underwater() && c.sites.is_empty() && c.water_alt > c.alt + 30.0 + }, + true, + ); + Self::generate_spots( + Spot::Shipwreck2, + world, + 1.0, |g, c| { g < 0.25 && c.is_underwater() && c.sites.is_empty() && c.water_alt > c.alt + 30.0 }, @@ -440,6 +479,21 @@ pub fn apply_spots_to(canvas: &mut Canvas, _dynamic_rng: &mut impl Rng) { (1..3, "common.entity.dungeon.tier-0.staff"), ], }, + Spot::GnarlingTree => SpotConfig { + base_structures: Some("spots_grasslands.gnarling_tree"), + entity_radius: 64.0, + entities: &[ + (1..5, "common.entity.dungeon.tier-0.spear"), + (2..4, "common.entity.dungeon.tier-0.bow"), + (1..2, "common.entity.dungeon.tier-0.staff"), + (1..4, "common.entity.wild.aggressive.deadwood"), + ], + }, + Spot::TrollCave => SpotConfig { + base_structures: Some("spots_general.troll_cave"), + entity_radius: 40.0, + entities: &[(1..2, "common.entity.wild.aggressive.cave_troll")], + }, // Random World Objects Spot::LionRock => SpotConfig { base_structures: Some("spots_savannah.lion_rock"), @@ -486,6 +540,11 @@ pub fn apply_spots_to(canvas: &mut Canvas, _dynamic_rng: &mut impl Rng) { entity_radius: 2.0, entities: &[(0..2, "common.entity.wild.peaceful.clownfish")], }, + Spot::Shipwreck2 => SpotConfig { + base_structures: Some("spots.water.shipwreck2"), + entity_radius: 20.0, + entities: &[(2..6, "common.entity.wild.peaceful.clownfish")], + }, }; // Blit base structure if let Some(base_structures) = spot_config.base_structures {