From d384c42354682ac57f9ad6188e8bc2f2288c9e3f Mon Sep 17 00:00:00 2001 From: Mark van Alphen Date: Sat, 1 Jun 2019 05:05:11 +0200 Subject: [PATCH] Fix Lavaland swarmers --- .../gamemodes/miniantags/bot_swarm/swarmer.dm | 60 +++++++++++++++---- code/modules/mining/lavaland/ash_flora.dm | 11 ++++ 2 files changed, 60 insertions(+), 11 deletions(-) diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm index 8689c6fb1d9..f1f5d4af878 100644 --- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm +++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm @@ -175,136 +175,174 @@ /atom/proc/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) S.DisIntegrate(src) + return TRUE /obj/item/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) S.Integrate(src) + return FALSE + +/atom/movable/lighting_object/swarmer_act() + return FALSE /obj/item/gun/swarmer_act()//Stops you from eating the entire armory - return + return FALSE /turf/simulated/floor/swarmer_act()//ex_act() on turf calls it on its contents, this is to prevent attacking mobs by DisIntegrate()'ing the floor - return + return FALSE /obj/machinery/atmospherics/swarmer_act() - return + return FALSE /obj/structure/disposalpipe/swarmer_act() - return + return FALSE /obj/machinery/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) S.DismantleMachine(src) + return TRUE /obj/machinery/light/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) S.DisIntegrate(src) + return TRUE /obj/machinery/door/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) S.DisIntegrate(src) + return TRUE /obj/machinery/camera/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) S.DisIntegrate(src) toggle_cam(S, 0) + return TRUE /obj/structure/particle_accelerator/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "Disrupting the power grid would bring no benefit to us. Aborting.") + return FALSE /obj/machinery/particle_accelerator/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) // Since the console is still parented to this to_chat(S, "Disrupting the power grid would bring no benefit to us. Aborting.") + return FALSE /obj/machinery/field/generator/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) if(!active) S.DisIntegrate(src) - return + return TRUE to_chat(S, "An inhospitable area may be created as a result of destroying this object. Aborting.") + return FALSE /obj/machinery/gravity_generator/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) S.DisIntegrate(src) + return TRUE /obj/machinery/vending/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)//It's more visually interesting than dismantling the machine S.DisIntegrate(src) + return TRUE /obj/machinery/turretid/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) S.DisIntegrate(src) + return TRUE /obj/machinery/chem_dispenser/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "The volatile chemicals in this machine would destroy us. Aborting.") + return FALSE /obj/machinery/nuclearbomb/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "This device's destruction would result in the extermination of everything in the area. Aborting.") + return FALSE /obj/effect/rune/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "Searching... sensor malfunction! Target lost. Aborting.") + return FALSE /obj/structure/reagent_dispensers/fueltank/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "Destroying this object would cause a chain reaction. Aborting.") + return FALSE /obj/structure/cable/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "Disrupting the power grid would bring no benefit to us. Aborting.") + return FALSE /obj/machinery/portable_atmospherics/canister/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "An inhospitable area may be created as a result of destroying this object. Aborting.") + return FALSE /obj/machinery/telecomms/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "This communications relay should be preserved, it will be a useful resource to our masters in the future. Aborting.") + return FALSE /obj/machinery/message_server/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "This communications relay should be preserved, it will be a useful resource to our masters in the future. Aborting.") + return FALSE /obj/machinery/blackbox_recorder/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "This machine has recorded large amounts of data on this structure and its inhabitants, it will be a useful resource to our masters in the future. Aborting. ") + return FALSE /obj/machinery/power/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "Disrupting the power grid would bring no benefit to us. Aborting.") + return FALSE /obj/machinery/gateway/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "This bluespace source will be important to us later. Aborting.") + return FALSE /obj/machinery/cryopod/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "This cryogenic sleeper should be preserved, it will be a useful resource to our masters in the future. Aborting.") + return FALSE /obj/structure/cryofeed/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "This cryogenic feed should be preserved, it will be a useful resource to our masters in the future. Aborting.") + return FALSE /obj/machinery/computer/cryopod/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "This cryopod control computer should be preserved, it contains useful items and information about the inhabitants. Aborting.") + return FALSE /turf/simulated/wall/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) for(var/turf/T in range(1, src)) if(istype(T, /turf/space) || istype(T.loc, /area/space) || istype(T, /turf/simulated/floor/plating/airless)) to_chat(S, "Destroying this object has the potential to cause a hull breach. Aborting.") - return - ..() + return FALSE + return ..() /obj/structure/window/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) for(var/turf/T in range(1, src)) if(istype(T, /turf/space) || istype(T.loc, /area/space)) to_chat(S, "Destroying this object has the potential to cause a hull breach. Aborting.") - return - ..() + return FALSE + return ..() /obj/item/stack/cable_coil/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)//Wiring would be too effective as a resource to_chat(S, "This object does not contain enough materials to work with.") + return FALSE /obj/item/circuitboard/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "This object does not contain enough materials to work with.") + return FALSE /obj/machinery/porta_turret/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "Attempting to dismantle this machine would result in an immediate counterattack. Aborting.") + return FALSE /obj/spacepod/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "Destroying this vehicle would destroy us. Aborting.") + return FALSE /obj/machinery/clonepod/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) if(occupant) to_chat(S, "Destroying this machine while it is occupied would result in biological and sentient resources to be harmed. Aborting.") - return - ..() + return FALSE + return ..() /mob/living/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) S.DisperseTarget(src) + return TRUE /mob/living/carbon/slime/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) to_chat(S, "This biological resource is somehow resisting our bluespace transceiver. Aborting.") + return FALSE +/obj/structure/lattice/catwalk/swarmer_catwalk/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) + to_chat(S, "We have created these for our own benefit. Aborting.") + return FALSE ////END CTRL CLICK FOR SWARMERS//// diff --git a/code/modules/mining/lavaland/ash_flora.dm b/code/modules/mining/lavaland/ash_flora.dm index 0e0d248d8b7..977a1de1cbb 100644 --- a/code/modules/mining/lavaland/ash_flora.dm +++ b/code/modules/mining/lavaland/ash_flora.dm @@ -26,6 +26,17 @@ if(prob(15)) harvest(null, TRUE) +/obj/structure/flora/ash/ex_act(severity, target) + switch(severity) + if(1) + qdel(src) + if(2) + prob(80) + qdel(src) + if(3) + prob(50) + qdel(src) + /obj/structure/flora/ash/proc/harvest(user, no_drop) if(harvested) return 0