From 56496c0e9b16441db6f1ab5274e208ca87b43cee Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+AnArgonianLizardThatStealsPRs@users.noreply.github.com> Date: Sat, 11 Nov 2023 16:26:36 +0300 Subject: [PATCH] dug snow farming, plants and ants & MORE (#560) dug snow farming, plants and ants Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com> --- .../modules/ashwalkers/code/buildings/antfarm.dm | 4 ++-- .../ashwalkers/code/buildings/ash_farming.dm | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/modular_skyrat/modules/ashwalkers/code/buildings/antfarm.dm b/modular_skyrat/modules/ashwalkers/code/buildings/antfarm.dm index 898aef8c5d9..c5f2e645c95 100644 --- a/modular_skyrat/modules/ashwalkers/code/buildings/antfarm.dm +++ b/modular_skyrat/modules/ashwalkers/code/buildings/antfarm.dm @@ -28,8 +28,8 @@ /obj/structure/antfarm/Initialize(mapload) . = ..() var/turf/src_turf = get_turf(src) - if(!istype(get_turf(src), /turf/open/misc/asteroid/basalt)) - src_turf.balloon_alert_to_viewers("must be on basalt") + if(!src_turf.GetComponent(/datum/component/simple_farm)) + src_turf.balloon_alert_to_viewers("must be on farmable surface") return INITIALIZE_HINT_QDEL for(var/obj/structure/antfarm/found_farm in range(2, get_turf(src))) diff --git a/modular_skyrat/modules/ashwalkers/code/buildings/ash_farming.dm b/modular_skyrat/modules/ashwalkers/code/buildings/ash_farming.dm index 15945e92ace..5de8573f6b6 100644 --- a/modular_skyrat/modules/ashwalkers/code/buildings/ash_farming.dm +++ b/modular_skyrat/modules/ashwalkers/code/buildings/ash_farming.dm @@ -271,6 +271,18 @@ plant_bag?.atom_storage?.attempt_insert(created_harvest, user, TRUE) -/turf/open/misc/asteroid/basalt/Initialize(mapload) +/turf/open/misc/asteroid/basalt/getDug() . = ..() AddComponent(/datum/component/simple_farm) + +/turf/open/misc/asteroid/basalt/refill_dug() + . = ..() + qdel(GetComponent(/datum/component/simple_farm)) + +/turf/open/misc/asteroid/snow/getDug() + . = ..() + AddComponent(/datum/component/simple_farm) + +/turf/open/misc/asteroid/snow/refill_dug() + . = ..() + qdel(GetComponent(/datum/component/simple_farm))