diff --git a/modular_skyrat/modules/ashwalkers/code/buildings/antfarm.dm b/modular_skyrat/modules/ashwalkers/code/buildings/antfarm.dm index 5e3a8fbd64c..898aef8c5d9 100644 --- a/modular_skyrat/modules/ashwalkers/code/buildings/antfarm.dm +++ b/modular_skyrat/modules/ashwalkers/code/buildings/antfarm.dm @@ -75,6 +75,17 @@ ant_chance++ return + if(istype(attacking_item, /obj/item/storage/bag/plants)) + balloon_alert(user, "feeding the ants") + for(var/obj/item/food/selected_food in attacking_item.contents) + if(!do_after(user, 1 SECONDS, src)) + return + + qdel(selected_food) + ant_chance++ + + return + return ..() /obj/item/stack/ore/glass/ten diff --git a/modular_skyrat/modules/ashwalkers/code/buildings/ash_farming.dm b/modular_skyrat/modules/ashwalkers/code/buildings/ash_farming.dm index f7979dee7c7..7e946053c5d 100644 --- a/modular_skyrat/modules/ashwalkers/code/buildings/ash_farming.dm +++ b/modular_skyrat/modules/ashwalkers/code/buildings/ash_farming.dm @@ -164,16 +164,25 @@ return else if(istype(attacking_item, /obj/item/worm_fertilizer)) - qdel(attacking_item) if(!decrease_cooldown(user, silent = TRUE) && !increase_yield(user, silent = TRUE)) balloon_alert(user, "plant is already fully upgraded") else balloon_alert(user, "plant was upgraded") + qdel(attacking_item) return + else if(istype(attacking_item, /obj/item/storage/bag/plants)) + if(!COOLDOWN_FINISHED(src, harvest_timer)) + return + + COOLDOWN_START(src, harvest_timer, harvest_cooldown) + create_harvest(attacking_item, user) + update_appearance() + return + return ..() /** @@ -227,7 +236,7 @@ /** * will create a harvest of the seeds product, with a chance to create a mutated version */ -/obj/structure/simple_farm/proc/create_harvest() +/obj/structure/simple_farm/proc/create_harvest(var/obj/item/storage/bag/plants/plant_bag, var/mob/user) if(!planted_seed) return @@ -241,7 +250,10 @@ if(!creating_obj) creating_obj = choose_seed - new creating_obj(get_turf(src)) + var/created_special = new creating_obj(get_turf(src)) + + plant_bag?.atom_storage?.attempt_insert(created_special, user, TRUE) + balloon_alert_to_viewers("something special drops!") continue @@ -250,7 +262,9 @@ if(!creating_obj) creating_obj = planted_seed.type - new creating_obj(get_turf(src)) + var/created_harvest = new creating_obj(get_turf(src)) + + plant_bag?.atom_storage?.attempt_insert(created_harvest, user, TRUE) /turf/open/misc/asteroid/basalt/Initialize(mapload) . = ..() diff --git a/modular_skyrat/modules/ashwalkers/code/buildings/wormfarm.dm b/modular_skyrat/modules/ashwalkers/code/buildings/wormfarm.dm index c47ad6ef9eb..94d8171cbc9 100644 --- a/modular_skyrat/modules/ashwalkers/code/buildings/wormfarm.dm +++ b/modular_skyrat/modules/ashwalkers/code/buildings/wormfarm.dm @@ -32,7 +32,7 @@ COOLDOWN_START(src, worm_timer, 1 MINUTES) - if(current_worm > 2 && current_worm < max_worm) + if(current_worm >= 2 && current_worm < max_worm) current_worm++ if(current_food > 0 && current_worm > 1) @@ -107,6 +107,24 @@ in_use = FALSE return + if(istype(attacking_item, /obj/item/storage/bag/plants)) + if(in_use) + balloon_alert(user, "currently in use") + return + in_use = TRUE + + balloon_alert(user, "feeding the worms") + for(var/obj/item/food/selected_food in attacking_item.contents) + if(!do_after(user, 1 SECONDS, src)) + in_use = FALSE + return + + qdel(selected_food) + current_food++ + + in_use = FALSE + return + //it wasn't a worm, or a piece of food return ..()