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", name: "Apple",
description: "Red and juicy. description: "Red and juicy.
Restores 2 Health.", Restores 20 Health.",
kind: Consumable( kind: Consumable(
kind: Apple, kind: Apple,
effect: Health(( effect: Health((
amount: 2, amount: 20,
cause: Item, cause: Item,
)), )),
), ),

View File

@ -628,7 +628,11 @@ pub fn block_from_structure(
) )
.map(|e| e as u8), .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 { StructureBlock::Chest => Some(if structure_seed % 10 < 7 {
Block::empty() Block::empty()
} else { } else {

View File

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