From a2fe6ec43b35f893976934d2ff561bb244fd9f8a Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Thu, 9 Jan 2025 09:04:40 +1100 Subject: [PATCH] Readding worms to turf digging. --- code/game/turfs/floors/floor_digging.dm | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/code/game/turfs/floors/floor_digging.dm b/code/game/turfs/floors/floor_digging.dm index 3351970e8af..d3cadac07f9 100644 --- a/code/game/turfs/floors/floor_digging.dm +++ b/code/game/turfs/floors/floor_digging.dm @@ -47,10 +47,20 @@ /turf/floor/get_diggable_resources() var/decl/material/my_material = get_material() - if(is_fundament() && istype(my_material) && my_material.dug_drop_type && (get_physical_height() > -(FLUID_DEEP))) - . = list() - .[my_material.dug_drop_type] = list("amount" = 3, "variance" = 2, "material" = my_material.type) - if(!gemstone_dropped && prob(my_material.gemstone_chance) && LAZYLEN(my_material.gemstone_types)) - gemstone_dropped = TRUE - var/gem_mat = pick(my_material.gemstone_types) - .[/obj/item/gemstone] = list("amount" = 1, "material" = gem_mat) + if(!is_fundament() || !istype(my_material) || !my_material.dug_drop_type || (get_physical_height() <= -(FLUID_DEEP))) + return + + . = list() + + // All turfs drop resources to backfill them with (or make firepits, etc) + .[my_material.dug_drop_type] = list("amount" = 3, "variance" = 2, "material" = my_material.type) + + // Dirt/mud/etc might have some worms. + if(prob(5 * get_plant_growth_rate())) + .[/obj/item/food/worm] = list("amount" = 1, "material" = /obj/item/food/worm::material) + + // Some materials (like clay) might contain gemstones. + if(!gemstone_dropped && prob(my_material.gemstone_chance) && LAZYLEN(my_material.gemstone_types)) + gemstone_dropped = TRUE + var/gem_mat = pick(my_material.gemstone_types) + .[/obj/item/gemstone] = list("amount" = 1, "material" = gem_mat)