mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Added spot loot
This commit is contained in:
parent
e05ca1f308
commit
87f4efd65b
@ -4,5 +4,9 @@
|
||||
(
|
||||
specifier: "world.structure.natural.saurok-altar",
|
||||
center: (10, 13, 3),
|
||||
custom_indices: {
|
||||
105: Filled(GlowingRock, (r: 161, g: 255, b: 133)),
|
||||
113: Filled(GlowingRock, (r: 139, g: 245, b: 104)),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
@ -3,6 +3,9 @@
|
||||
[
|
||||
(
|
||||
specifier: "world.structure.natural.gnarling_totem",
|
||||
center: (9, 5, 5)
|
||||
center: (9, 5, 5),
|
||||
custom_indices: {
|
||||
217: Filled(GlowingRock, (r: 0, g: 255, b: 246)),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
@ -1,8 +1,8 @@
|
||||
#![enable(unwrap_newtypes)]
|
||||
|
||||
[
|
||||
[
|
||||
(
|
||||
specifier: "world.structure.natural.airship-crashsite_0",
|
||||
center: (28, 40, 14)
|
||||
center: (28, 40, 14),
|
||||
),
|
||||
]
|
||||
|
BIN
assets/world/structure/dungeon/pillar_entrance/4.vox
(Stored with Git LFS)
BIN
assets/world/structure/dungeon/pillar_entrance/4.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/world/structure/natural/airship-crashsite_0.vox
(Stored with Git LFS)
BIN
assets/world/structure/natural/airship-crashsite_0.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/world/structure/natural/dwarven_grave.vox
(Stored with Git LFS)
BIN
assets/world/structure/natural/dwarven_grave.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/world/structure/natural/gnarling_totem.vox
(Stored with Git LFS)
BIN
assets/world/structure/natural/gnarling_totem.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/world/structure/natural/lionrock_0.vox
(Stored with Git LFS)
BIN
assets/world/structure/natural/lionrock_0.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/world/structure/natural/myrmidon-temple.vox
(Stored with Git LFS)
BIN
assets/world/structure/natural/myrmidon-temple.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/world/structure/natural/rock-circle.vox
(Stored with Git LFS)
BIN
assets/world/structure/natural/rock-circle.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/world/structure/natural/saurok-altar.vox
(Stored with Git LFS)
BIN
assets/world/structure/natural/saurok-altar.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/world/structure/natural/skull-large.vox
(Stored with Git LFS)
BIN
assets/world/structure/natural/skull-large.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/world/structure/natural/witch-hut-black_0.vox
(Stored with Git LFS)
BIN
assets/world/structure/natural/witch-hut-black_0.vox
(Stored with Git LFS)
Binary file not shown.
@ -237,6 +237,7 @@ impl Block {
|
||||
BlockKind::Snow => Some(0.1),
|
||||
BlockKind::Lava => None,
|
||||
_ => self.get_sprite().and_then(|sprite| match sprite {
|
||||
sprite if sprite.is_container() => None,
|
||||
SpriteKind::Anvil
|
||||
| SpriteKind::Cauldron
|
||||
| SpriteKind::CookingPot
|
||||
|
@ -13,7 +13,7 @@ use vek::*;
|
||||
make_case_elim!(
|
||||
structure_block,
|
||||
#[derive(Copy, Clone, PartialEq, Debug, Deserialize)]
|
||||
#[repr(u32)]
|
||||
#[repr(u8)]
|
||||
pub enum StructureBlock {
|
||||
None = 0,
|
||||
Grass = 1,
|
||||
|
@ -239,7 +239,7 @@ pub fn block_from_structure(
|
||||
|
||||
match sblock {
|
||||
StructureBlock::None => None,
|
||||
StructureBlock::Hollow => Some(with_sprite(SpriteKind::Empty)),
|
||||
StructureBlock::Hollow => Some(Block::air(SpriteKind::Empty)),
|
||||
StructureBlock::Grass => Some(Block::new(
|
||||
BlockKind::Grass,
|
||||
sample.surface_color.map(|e| (e * 255.0) as u8),
|
||||
@ -270,10 +270,16 @@ pub fn block_from_structure(
|
||||
}
|
||||
},
|
||||
StructureBlock::Chest => {
|
||||
if structure_seed % 10 < 7 {
|
||||
Some(Block::empty())
|
||||
let old_block = with_sprite(SpriteKind::Empty);
|
||||
let block = if old_block.is_fluid() {
|
||||
old_block
|
||||
} else {
|
||||
Some(with_sprite(SpriteKind::Chest))
|
||||
Block::air(SpriteKind::Empty)
|
||||
};
|
||||
if field.get(pos + structure_pos) % 16 < 8 {
|
||||
Some(block)
|
||||
} else {
|
||||
Some(block.with_sprite(SpriteKind::Chest))
|
||||
}
|
||||
},
|
||||
StructureBlock::Log => Some(Block::new(BlockKind::Wood, Rgb::new(60, 30, 0))),
|
||||
|
@ -279,7 +279,7 @@ impl Spot {
|
||||
/ 1000.0f32.powi(2))
|
||||
.ceil() as u64
|
||||
{
|
||||
let pos = world_size.map(|e| world.rng.gen_range(0..e as i32));
|
||||
let pos = world_size.map(|e| (world.rng.gen_range(0..e) & !0b11) as i32);
|
||||
if let Some((_, chunk)) = world
|
||||
.get_gradient_approx(pos)
|
||||
.zip(world.get_mut(pos))
|
||||
@ -367,7 +367,7 @@ pub fn apply_spots_to(canvas: &mut Canvas, _dynamic_rng: &mut impl Rng) {
|
||||
Spot::LionRock => SpotConfig {
|
||||
base_structures: Some("spots_savannah.lion_rock"),
|
||||
entity_radius: 20.0,
|
||||
entities: &[(0..8, "common.entity.wild.aggressive.lion")],
|
||||
entities: &[(5..8, "common.entity.wild.aggressive.lion")],
|
||||
},
|
||||
Spot::TreeStumpForest => SpotConfig {
|
||||
base_structures: Some("trees.oak_stumps"),
|
||||
|
@ -2065,7 +2065,10 @@ impl WorldSim {
|
||||
let env = Environment {
|
||||
humid: chunk.humidity,
|
||||
temp: chunk.temp,
|
||||
near_water: if chunk.river.is_lake() || chunk.river.near_river() {
|
||||
near_water: if chunk.river.is_lake()
|
||||
|| chunk.river.near_river()
|
||||
|| chunk.alt < CONFIG.sea_level + 3.0
|
||||
{
|
||||
1.0
|
||||
} else {
|
||||
0.0
|
||||
|
Loading…
Reference in New Issue
Block a user