Make apples great again

This commit is contained in:
timokoesters 2020-03-27 17:50:45 +01:00
parent c3a4f897da
commit 6fd3339b75
3 changed files with 8 additions and 4 deletions

View File

@ -2,11 +2,11 @@ Item(
name: "Apple",
description: "Red and juicy.
Restores 2 Health.",
Restores 20 Health.",
kind: Consumable(
kind: Apple,
effect: Health((
amount: 2,
amount: 20,
cause: Item,
)),
),

View File

@ -628,7 +628,11 @@ pub fn block_from_structure(
)
.map(|e| e as u8),
)),
StructureBlock::Fruit => Some(Block::new(BlockKind::Apple, Rgb::new(194, 30, 37))),
StructureBlock::Fruit => Some(if field.get(pos + structure_pos) % 3 > 0 {
Block::empty()
} else {
Block::new(BlockKind::Apple, Rgb::new(194, 30, 37))
}),
StructureBlock::Chest => Some(if structure_seed % 10 < 7 {
Block::empty()
} else {

View File

@ -56,7 +56,7 @@ pub fn structure_gen<'a>(
ForestKind::Palm => &PALMS,
ForestKind::Savannah => &ACACIAS,
ForestKind::Oak if QUIRKY_RAND.get(st_seed) % 16 == 7 => &OAK_STUMPS,
ForestKind::Oak if QUIRKY_RAND.get(st_seed) % 8 == 7 => &FRUIT_TREES,
ForestKind::Oak if QUIRKY_RAND.get(st_seed) % 19 == 7 => &FRUIT_TREES,
ForestKind::Oak if QUIRKY_RAND.get(st_seed) % 14 == 7 => &BIRCHES,
ForestKind::Oak => &OAKS,
ForestKind::Pine => &PINES,