From c3068ba2a956fea20396c18917654de71a8f8e1c Mon Sep 17 00:00:00 2001 From: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> Date: Sat, 24 Feb 2024 18:14:57 -0500 Subject: [PATCH] Fixes issues and improves millstones, ant farms and seed meshes (#1070) * Fixes a few issues with millstones, improves feedback * Makes ant farms easier to fill with food, stop you when no longer needed, gives all sand back when destroyed * Makes seed meshes only take 2 seconds to sift through sand and increases chance of finding seed to 50% * Addresses review comments in order to improve the ant farm code --- .../ashwalkers/code/buildings/antfarm.dm | 18 ++++++++++++------ .../ashwalkers/code/items/ash_seedmesh.dm | 4 ++-- .../code/millstone.dm | 9 +++++---- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/modular_nova/modules/ashwalkers/code/buildings/antfarm.dm b/modular_nova/modules/ashwalkers/code/buildings/antfarm.dm index 32f0b9b51c4..ec9be754d33 100644 --- a/modular_nova/modules/ashwalkers/code/buildings/antfarm.dm +++ b/modular_nova/modules/ashwalkers/code/buildings/antfarm.dm @@ -44,7 +44,7 @@ /obj/structure/antfarm/Destroy() STOP_PROCESSING(SSobj, src) - new /obj/item/stack/ore/glass/ten(get_turf(src)) + new /obj/item/stack/ore/glass(get_turf(src), 20) return ..() /obj/structure/antfarm/process(seconds_per_tick) @@ -66,19 +66,28 @@ /obj/structure/antfarm/examine(mob/user) . = ..() . += span_notice("
There are currently [has_ants ? "" : "no "]ants in the farm.") - . += span_notice("To add ants, feed the farm some food.") + if(!has_ants) + . += span_notice("To add ants, feed the farm some food.") /obj/structure/antfarm/attackby(obj/item/attacking_item, mob/user, params) if(istype(attacking_item, /obj/item/food)) + if(has_ants) + balloon_alert(user, "ants block the way!") + return + qdel(attacking_item) balloon_alert(user, "food has been placed") ant_chance++ return if(istype(attacking_item, /obj/item/storage/bag/plants)) + if(has_ants) + balloon_alert(user, "ants block the way!") + return + balloon_alert(user, "feeding the ants") for(var/obj/item/food/selected_food in attacking_item.contents) - if(!do_after(user, 1 SECONDS, src)) + if(has_ants || !do_after(user, 0.5 SECONDS, src)) return qdel(selected_food) @@ -87,6 +96,3 @@ return return ..() - -/obj/item/stack/ore/glass/ten - amount = 10 diff --git a/modular_nova/modules/ashwalkers/code/items/ash_seedmesh.dm b/modular_nova/modules/ashwalkers/code/items/ash_seedmesh.dm index 5738c2d4716..bda8aa081db 100644 --- a/modular_nova/modules/ashwalkers/code/items/ash_seedmesh.dm +++ b/modular_nova/modules/ashwalkers/code/items/ash_seedmesh.dm @@ -15,7 +15,7 @@ return while(ore_item.amount >= 5) - if(!do_after(user, 5 SECONDS, src)) + if(!do_after(user, 2 SECONDS, src)) user.balloon_alert(user, "have to stand still!") return @@ -23,7 +23,7 @@ user.balloon_alert(user, "unable to use five of [ore_item]!") return - if(prob(70)) + if(prob(50)) user.balloon_alert(user, "[ore_item] reveals nothing!") continue diff --git a/modular_nova/modules/primitive_cooking_additions/code/millstone.dm b/modular_nova/modules/primitive_cooking_additions/code/millstone.dm index 18349258845..91402f44099 100644 --- a/modular_nova/modules/primitive_cooking_additions/code/millstone.dm +++ b/modular_nova/modules/primitive_cooking_additions/code/millstone.dm @@ -35,7 +35,7 @@ . += span_notice("And it can fit [maximum_contained_items - length(contents)] more items in it.") else - . += span_notice("It can hold [maximum_contained_items] items, and there is nothing in it presently.") + . += span_notice("It can hold [maximum_contained_items] items, and there is nothing in it presently.") . += span_notice("You can [anchored ? "un" : ""]secure [src] with CTRL-Shift-Click.") . += span_notice("With a prying tool of some sort, you could take [src] apart.") @@ -112,7 +112,7 @@ return TRUE - if(!((istype(attacking_item, /obj/item/food/grown/)) || (istype(attacking_item, /obj/item/grown)))) + if(!(istype(attacking_item, /obj/item/food/grown) || istype(attacking_item, /obj/item/grown))) balloon_alert(user, "can only mill plants") return ..() @@ -121,7 +121,8 @@ return attacking_item.forceMove(src) - return ..() + balloon_alert(user, "transferred [attacking_item]") + return TRUE /// Takes the content's seeds and spits them out on the turf, as well as grinding whatever the contents may be /obj/structure/millstone/proc/mill_it_up(mob/living/carbon/human/user) @@ -150,7 +151,7 @@ for(var/target_item as anything in contents) seedify(target_item, t_max = 1) - return + balloon_alert_to_viewers("finished grinding") #undef MILLSTONE_STAMINA_MINIMUM #undef MILLSTONE_STAMINA_USE