ore deposits, flower drops

This commit is contained in:
jshipsey 2021-05-24 07:43:48 -04:00 committed by Marcel Märtens
parent 1c17d8fe5e
commit 05de96c94b
17 changed files with 235 additions and 34 deletions

View File

@ -1,16 +1,21 @@
[
(10, Velorite),
(15, VeloriteFrag),
(1, Stones),
(100, ShortGrass),
(1, CaveMushroom),
(30, AmethystSmall),
(30, TopazSmall),
(10, CaveMushroom),
(10, AmethystSmall),
(10, TopazSmall),
(16, SapphireSmall),
(60, Crystal),
(12, EmeraldSmall),
(30, Cobalt),
(10, Bloodstone),
(40, Coal),
(60, Iron),
(10, Silver),
(6, Gold),
(8, RubySmall),
(4, DiamondSmall),
(8, DiamondSmall),
(5, Chest),
(15, Crate),
]

View File

@ -5,11 +5,11 @@
(150, ShortGrass),
(120, CaveMushroom),
(30, AmethystSmall),
(30, TopazSmall),
(16, SapphireSmall),
(12, EmeraldSmall),
(8, RubySmall),
(4, DiamondSmall),
(15, TopazSmall),
(20, Tin),
(16, Copper),
(5, Coal),
(8, Iron),
(5, Chest),
(15, Crate),
]

View File

@ -0,0 +1,9 @@
ItemDef(
name: "Lively Vine",
description: "I think it just moved.",
kind: Ingredient(
kind: "LivelyVine",
),
quality: Common,
tags: [],
)

View File

@ -1,9 +0,0 @@
ItemDef(
name: "Vine",
description: "A strong vine.",
kind: Ingredient(
kind: "Vine",
),
quality: Common,
tags: [],
)

View File

@ -1,5 +1,4 @@
[
(1.0, Item("common.items.flowers.red")),
(1.0, Item("common.items.crafting_ing.twigs")),
(1.0, Item("common.items.crafting_ing.animal_misc.lively_vine")),
(1.0, LootTable("common.loot_tables.food.wild_ingredients")),
]

View File

@ -2467,7 +2467,7 @@
),
Ingredient("Scale"): VoxTrans(
"voxel.sprite.crafting_ing.hide.scale",
(0.0, 0.0, 0.0), (-20.0, 10.0, 20.0), 0.9,
(0.0, 0.0, 0.0), (-20.0, 10.0, 20.0), 0.8,
),
Ingredient("DragonScale"): VoxTrans(
"voxel.sprite.crafting_ing.hide.dragon_scale",
@ -2481,6 +2481,10 @@
"voxel.sprite.crafting_ing.animal_misc.venom_sac",
(0.0, 0.0, 0.0), (-20.0, 10.0, 20.0), 0.9,
),
Ingredient("LivelyVine"): VoxTrans(
"voxel.sprite.crafting_ing.animal_misc.lively_vine",
(0.0, 0.0, 0.0), (-40.0, -40.0, 20.0), 1.2,
),
Ingredient("SharpFang"): VoxTrans(
"voxel.sprite.crafting_ing.animal_misc.sharp_fang",
(0.0, 0.0, 0.0), (-20.0, 10.0, 20.0), 0.9,
@ -2497,6 +2501,14 @@
"voxel.sprite.crafting_ing.plant_fiber",
(0.0, 0.0, 0.0), (-20.0, 10.0, 20.0), 0.9,
),
Ingredient("Moonbell"): VoxTrans(
"voxel.sprite.flowers.moonbell",
(0.0, 0.0, 0.0), (-65.0, 40.0, 20.0), 0.9,
),
Ingredient("Pyrebloom"): VoxTrans(
"voxel.sprite.flowers.pyrebloom",
(0.0, 0.0, 0.0), (-75.0, 0.0, 20.0), 0.9,
),
Ingredient("CottonBoll"): VoxTrans(
"voxel.sprite.crafting_ing.cotton_boll",
(0.0, 0.0, 0.0), (-65.0, 0.0, 20.0), 0.9,
@ -2581,8 +2593,8 @@
"voxel.sprite.mineral.ore.orichalcum",
(0.0, 0.0, 0.0), (-20.0, 10.0, 20.0), 0.9,
),
Ingredient("BloodsteelOre"): VoxTrans(
"voxel.sprite.mineral.ore.bloodsteel",
Ingredient("BloodstoneOre"): VoxTrans(
"voxel.sprite.mineral.ore.bloodstone",
(0.0, 0.0, 0.0), (-60.0, 30.0, 20.0), 0.8,
),
Ingredient("CobaltOre"): VoxTrans(

BIN
assets/voxygen/voxel/object/meat_drop.vox (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/voxel/object/steak.vox (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
assets/voxygen/voxel/sprite/mineral/deposit/gold.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/sprite/mineral/deposit/silver.vox (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -2902,6 +2902,86 @@ SapphireSmall: Some((
],
wind_sway: 0.0,
)),
Bloodstone: Some((
variations: [
(
model: "voxygen.voxel.sprite.mineral.deposit.bloodstone",
offset: (-5.5, -5.5, 0.0),
lod_axes: (0.0, 0.0, 0.0),
),
],
wind_sway: 0.0,
)),
Coal: Some((
variations: [
(
model: "voxygen.voxel.sprite.mineral.deposit.coal",
offset: (-5.5, -5.5, 0.0),
lod_axes: (0.0, 0.0, 0.0),
),
],
wind_sway: 0.0,
)),
Cobalt: Some((
variations: [
(
model: "voxygen.voxel.sprite.mineral.deposit.cobalt",
offset: (-5.5, -5.5, 0.0),
lod_axes: (0.0, 0.0, 0.0),
),
],
wind_sway: 0.0,
)),
Copper: Some((
variations: [
(
model: "voxygen.voxel.sprite.mineral.deposit.copper",
offset: (-5.5, -5.5, 0.0),
lod_axes: (0.0, 0.0, 0.0),
),
],
wind_sway: 0.0,
)),
Iron: Some((
variations: [
(
model: "voxygen.voxel.sprite.mineral.deposit.iron",
offset: (-5.5, -5.5, 0.0),
lod_axes: (0.0, 0.0, 0.0),
),
],
wind_sway: 0.0,
)),
Tin: Some((
variations: [
(
model: "voxygen.voxel.sprite.mineral.deposit.tin",
offset: (-5.5, -5.5, 0.0),
lod_axes: (0.0, 0.0, 0.0),
),
],
wind_sway: 0.0,
)),
Silver: Some((
variations: [
(
model: "voxygen.voxel.sprite.mineral.deposit.silver",
offset: (-5.5, -5.5, 0.0),
lod_axes: (0.0, 0.0, 0.0),
),
],
wind_sway: 0.0,
)),
Gold: Some((
variations: [
(
model: "voxygen.voxel.sprite.mineral.deposit.gold",
offset: (-5.5, -5.5, 0.0),
lod_axes: (0.0, 0.0, 0.0),
),
],
wind_sway: 0.0,
)),
Crystal: Some((
variations: [
(
@ -2912,6 +2992,36 @@ Crystal: Some((
],
wind_sway: 0.0,
)),
Cotton: Some((
variations: [
(
model: "voxygen.voxel.sprite.flowers.cotton",
offset: (-4.5, -4.5, 0.0),
lod_axes: (0.0, 0.0, 0.0),
),
],
wind_sway: 0.0,
)),
Moonbell: Some((
variations: [
(
model: "voxygen.voxel.sprite.flowers.moonbell",
offset: (-3.5, -6.0, 0.0),
lod_axes: (0.0, 0.0, 0.0),
),
],
wind_sway: 0.0,
)),
Pyrebloom: Some((
variations: [
(
model: "voxygen.voxel.sprite.flowers.pyrebloom",
offset: (-5.5, -6.0, 0.0),
lod_axes: (0.0, 0.0, 0.0),
),
],
wind_sway: 0.0,
)),
// Lantern
Lantern: Some((
variations: [

View File

@ -738,6 +738,17 @@ impl Item {
SpriteKind::RubySmall => "common.items.mineral.gem.ruby",
SpriteKind::EmeraldSmall => "common.items.mineral.emerald",
SpriteKind::SapphireSmall => "common.items.mineral.gem.sapphire",
SpriteKind::Bloodstone => "common.items.mineral.ore.bloodstone",
SpriteKind::Coal => "common.items.mineral.ore.coal",
SpriteKind::Cobalt => "common.items.mineral.ore.cobalt",
SpriteKind::Copper => "common.items.mineral.ore.copper",
SpriteKind::Iron => "common.items.mineral.ore.iron",
SpriteKind::Tin => "common.items.mineral.ore.tin",
SpriteKind::Silver => "common.items.mineral.ore.silver",
SpriteKind::Gold => "common.items.mineral.ore.gold",
SpriteKind::Cotton => "common.items.crafting_ing.cotton_boll",
SpriteKind::Moonbell => "common.items.flowers.moonbell",
SpriteKind::Pyrebloom => "common.items.flowers.pyrebloom",
SpriteKind::Seashells => "common.items.crafting_ing.seashells",
// Containers
// IMPORTANT: Add any new container to `SpriteKind::is_container`

View File

@ -157,6 +157,17 @@ make_case_elim!(
Loom = 0x82,
SpinningWheel = 0x83,
Crystal = 0x84,
Bloodstone = 0x85,
Coal = 0x86,
Cobalt = 0x87,
Copper = 0x88,
Iron = 0x89,
Tin = 0x8A,
Silver = 0x8B,
Gold = 0x8C,
Cotton = 0x8D,
Moonbell = 0x8E,
Pyrebloom = 0x8F,
}
);
@ -230,6 +241,15 @@ impl SpriteKind {
// TODO: Figure out if this should be solid or not.
SpriteKind::Shelf => 1.0,
SpriteKind::Lantern => 0.9,
SpriteKind::Crystal => 1.5,
SpriteKind::Bloodstone
| SpriteKind::Coal
| SpriteKind::Cobalt
| SpriteKind::Copper
| SpriteKind::Iron
| SpriteKind::Tin
| SpriteKind::Silver
| SpriteKind::Gold => 0.6,
_ => return None,
})
}
@ -269,6 +289,9 @@ impl SpriteKind {
SpriteKind::ChestBuried => true,
SpriteKind::Mud => true,
SpriteKind::Seashells => true,
SpriteKind::Cotton => true,
SpriteKind::Moonbell => true,
SpriteKind::Pyrebloom => true,
_ => false,
}
}
@ -306,6 +329,14 @@ impl SpriteKind {
| SpriteKind::DiamondSmall
| SpriteKind::RubySmall
| SpriteKind::EmeraldSmall
| SpriteKind::Bloodstone
| SpriteKind::Coal
| SpriteKind::Cobalt
| SpriteKind::Copper
| SpriteKind::Iron
| SpriteKind::Tin
| SpriteKind::Silver
| SpriteKind::Gold
| SpriteKind::SapphireSmall => Some(ToolKind::Pick),
_ => None,
}

View File

@ -181,7 +181,8 @@ pub fn apply_caves_to(canvas: &mut Canvas, rng: &mut impl Rng) {
// Scatter things in caves
if difficulty.round() < 2.0 {
if rng.gen::<f32>() < 0.3 * difficulty.powf(1.5) * (cave_x.max(0.5).powf(4.0))
if rng.gen::<f32>()
< 0.75 * (difficulty / 2.0).powf(2.5) * (cave_x.max(0.5).powf(4.0))
&& cave_base < surface_z as i32 - 25
{
let kind = *Lottery::<SpriteKind>::load_expect("common.cave_scatter.shallow")
@ -192,7 +193,8 @@ pub fn apply_caves_to(canvas: &mut Canvas, rng: &mut impl Rng) {
});
}
} else {
if rng.gen::<f32>() < 0.1 * difficulty.powf(1.5) * (cave_x.max(0.5).powf(4.0))
if rng.gen::<f32>()
< 0.3 * (difficulty / 3.0).powf(2.5) * (cave_x.max(0.5).powf(4.0))
&& cave_base < surface_z as i32 - 25
{
let kind = *Lottery::<SpriteKind>::load_expect("common.cave_scatter.deep")
@ -246,7 +248,7 @@ pub fn apply_caves_supplement<'a>(
let difficulty = cave_depth / 50.0;
// Scatter things in caves
if RandomField::new(index.seed).chance(wpos2d.into(), 0.001 * difficulty)
if RandomField::new(index.seed).chance(wpos2d.into(), 0.001 * difficulty.powf(0.5))
&& cave_base < surface_z as i32 - 40
{
let is_hostile: bool;

View File

@ -85,6 +85,18 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) {
Some((100.0, 0.1)),
)
}),
(Cotton, false, |c, col| {
(
close(c.temp, CONFIG.temperate_temp, 0.7).min(close(
c.humidity,
CONFIG.jungle_hum,
0.4,
)) * col.tree_density
* MUSH_FACT
* 75.0,
Some((256.0, 0.25)),
)
}),
(Sunflower, false, |c, col| {
(
close(c.temp, 0.0, 0.7).min(close(c.humidity, CONFIG.jungle_hum, 0.4))
@ -196,6 +208,16 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) {
Some((48.0, 0.2)),
)
}),
(Moonbell, false, |c, _| {
(
close(c.temp, CONFIG.snow_temp - 0.2, 0.4).min(close(
c.humidity,
CONFIG.forest_hum,
0.5,
)) * 0.003,
Some((48.0, 0.2)),
)
}),
// Savanna Plants
(SavannaGrass, false, |c, _| {
(
@ -244,6 +266,12 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) {
None,
)
}),
(Pyrebloom, false, |c, _| {
(
close(c.temp, 1.0, 0.95).min(close(c.humidity, 0.0, 0.3)) * MUSH_FACT * 0.75,
None,
)
}),
(LargeCactus, false, |c, _| {
(
close(c.temp, 1.0, 0.25).min(close(c.humidity, 0.0, 0.1)) * MUSH_FACT * 3.5,