mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Added new Spots, Shrubs and Ships.
Spots - Gnarling Tree - Troll Cave - Underwater Shipwreck second variation. Shrubs added to biomes - Savannah Shrubs - Taiga Shrubs - Temperate Shrubs Galleon ship added
This commit is contained in:
parent
cd2f7ad83a
commit
b1476071b1
@ -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"),
|
||||
),
|
||||
),
|
||||
})
|
||||
|
BIN
assets/server/voxel/galleon/structure.vox
(Stored with Git LFS)
Normal file
BIN
assets/server/voxel/galleon/structure.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -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),
|
||||
|
44
assets/world/manifests/shrubs/savannah.ron
Normal file
44
assets/world/manifests/shrubs/savannah.ron
Normal file
@ -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),
|
||||
),
|
||||
]
|
28
assets/world/manifests/shrubs/taiga.ron
Normal file
28
assets/world/manifests/shrubs/taiga.ron
Normal file
@ -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),
|
||||
),
|
||||
]
|
24
assets/world/manifests/shrubs/temperate.ron
Normal file
24
assets/world/manifests/shrubs/temperate.ron
Normal file
@ -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),
|
||||
),
|
||||
]
|
12
assets/world/manifests/spots/water/shipwreck2.ron
Normal file
12
assets/world/manifests/spots/water/shipwreck2.ron
Normal file
@ -0,0 +1,12 @@
|
||||
#![enable(unwrap_newtypes)]
|
||||
|
||||
[
|
||||
(
|
||||
specifier: "world.structure.natural.shipwreck2",
|
||||
center: (32, 31, 14),
|
||||
/// ( X, Y, Z, )
|
||||
custom_indices: {
|
||||
48: Sprite(Chest),
|
||||
},
|
||||
),
|
||||
]
|
9
assets/world/manifests/spots_general/troll_cave.ron
Normal file
9
assets/world/manifests/spots_general/troll_cave.ron
Normal file
@ -0,0 +1,9 @@
|
||||
#![enable(unwrap_newtypes)]
|
||||
|
||||
[
|
||||
(
|
||||
specifier: "world.structure.natural.troll_cave",
|
||||
center: (23, 25, 12),
|
||||
/// ( X, Y, Z, )
|
||||
),
|
||||
]
|
12
assets/world/manifests/spots_grasslands/gnarling_tree.ron
Normal file
12
assets/world/manifests/spots_grasslands/gnarling_tree.ron
Normal file
@ -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),
|
||||
},
|
||||
),
|
||||
]
|
BIN
assets/world/shrub/1.vox
(Stored with Git LFS)
BIN
assets/world/shrub/1.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/world/shrub/savannah/bush-0.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/savannah/bush-0.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/savannah/bush-1.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/savannah/bush-1.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/savannah/bush-2.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/savannah/bush-2.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/savannah/bush-3.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/savannah/bush-3.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/savannah/bush-4.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/savannah/bush-4.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/savannah/bush-5.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/savannah/bush-5.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/savannah/bush-6.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/savannah/bush-6.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/savannah/bush-7.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/savannah/bush-7.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/savannah/bush-8.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/savannah/bush-8.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/savannah/bush-9.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/savannah/bush-9.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/taiga/bush-0.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/taiga/bush-0.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/taiga/bush-1.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/taiga/bush-1.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/taiga/bush-2.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/taiga/bush-2.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/taiga/bush-3.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/taiga/bush-3.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/taiga/bush-4.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/taiga/bush-4.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/taiga/bush-5.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/taiga/bush-5.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/temperate/bush-0.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/temperate/bush-0.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/temperate/bush-1.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/temperate/bush-1.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/temperate/bush-2.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/temperate/bush-2.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/temperate/bush-3.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/temperate/bush-3.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/shrub/temperate/bush-4.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/shrub/temperate/bush-4.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/structure/natural/gnarling_tree.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/structure/natural/gnarling_tree.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/structure/natural/shipwreck2.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/structure/natural/shipwreck2.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/structure/natural/troll_cave.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/structure/natural/troll_cave.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -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],
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
@ -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),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,11 @@ use vek::*;
|
||||
|
||||
lazy_static! {
|
||||
static ref JUNGLE_SHRUBS: AssetHandle<StructuresGroup> = Structure::load_group("shrubs.jungle");
|
||||
static ref SAVANNAH_SHRUBS: AssetHandle<StructuresGroup> =
|
||||
Structure::load_group("shrubs.savannah");
|
||||
static ref TEMPERATE_SHRUBS: AssetHandle<StructuresGroup> =
|
||||
Structure::load_group("shrubs.temperate");
|
||||
static ref TAIGA_SHRUBS: AssetHandle<StructuresGroup> = 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();
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user