diff --git a/assets/drop_tables.toml b/assets/drop_tables.toml index bb03d3b..50bb4f0 100644 --- a/assets/drop_tables.toml +++ b/assets/drop_tables.toml @@ -13,3 +13,13 @@ drops = [ [air] drops = [] + +# Tree fixtures — activated by fell_tree. +# Add WoodLog prefab + uncomment when log items exist. +# [tree_trunk] +# drops = [ +# { prefab = "WoodLog", chance_pct = 100, min_count = 1, max_count = 1 }, +# ] + +# [tree_leaf] +# drops = [] diff --git a/src/entities/shared_systems/digging.rs b/src/entities/shared_systems/digging.rs index 9f232fd..c68990d 100644 --- a/src/entities/shared_systems/digging.rs +++ b/src/entities/shared_systems/digging.rs @@ -1,7 +1,8 @@ use crate::constants::ITILE_SIZE; use crate::entities::item::drop_table::dig_rng; use crate::entities::item::prefabs::misc::misc_prefabs::spawn_prefab; -use crate::world::chunks::{Z_ABOVE, Z_BELOW}; +use crate::world::chunks::Z_BELOW; +use crate::world::generation::forestry::{fell_tree, TreePart}; use crate::world::tiles::tile_changed::TileChangedEvent; use crate::world::tiles::visibility::TileOcclusionEvent; use crate::world::tiles::TileMap; @@ -27,6 +28,7 @@ pub fn dig_system( asset_server: Res, time: Res