diff --git a/code/game/turfs/simulated/floor/chasm.dm b/code/game/turfs/simulated/floor/chasm.dm index 5e3c05359ae1..8b73f6610ccf 100644 --- a/code/game/turfs/simulated/floor/chasm.dm +++ b/code/game/turfs/simulated/floor/chasm.dm @@ -29,7 +29,8 @@ /obj/effect/ebeam, /obj/effect/spawner, /obj/structure/railing, - /obj/machinery/atmospherics/pipe/simple + /obj/machinery/atmospherics/pipe/simple, + /mob/living/simple_animal/hostile/megafauna //failsafe )) var/drop_x = 1 var/drop_y = 1 @@ -44,6 +45,12 @@ if(!drop_stuff()) STOP_PROCESSING(SSprocessing, src) +/turf/simulated/floor/chasm/CanPathfindPass(obj/item/card/id/ID, to_dir, caller, no_id = FALSE) + if(!isliving(caller)) + return TRUE + var/mob/living/L = caller + return (L.flying || ismegafauna(caller)) + /turf/simulated/floor/chasm/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir) underlay_appearance.icon = 'icons/turf/floors.dmi' underlay_appearance.icon_state = "basalt" diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/ancient_robot.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/ancient_robot.dm index bd15eec41213..92b16aa46d2d 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/ancient_robot.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/ancient_robot.dm @@ -243,7 +243,6 @@ Difficulty: Hard /mob/living/simple_animal/hostile/megafauna/ancient_robot/Bump(atom/A, yes) if(charging) - DestroySurroundings() if(isliving(A) && yes) var/mob/living/L = A if(!istype(A, /mob/living/simple_animal/hostile/ancient_robot_leg)) @@ -511,8 +510,6 @@ Difficulty: Hard return /mob/living/simple_animal/hostile/megafauna/ancient_robot/Moved(atom/OldLoc, Dir, Forced = FALSE) - if(charging) - DestroySurroundings() if(Dir) leg_walking_controler(Dir) if(charging) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm index d63091b92267..f91b6ac6b128 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm @@ -463,8 +463,6 @@ Difficulty: Hard /mob/living/simple_animal/hostile/megafauna/bubblegum/Moved(atom/OldLoc, Dir, Forced = FALSE) if(Dir) new /obj/effect/decal/cleanable/blood/bubblegum(loc) - if(charging) - DestroySurroundings() playsound(src, 'sound/effects/meteorimpact.ogg', 200, TRUE, 2, TRUE) return ..() @@ -472,7 +470,6 @@ Difficulty: Hard if(charging && yes) if(isturf(A) || isobj(A) && A.density) A.ex_act(EXPLODE_HEAVY) - DestroySurroundings() if(isliving(A)) var/mob/living/L = A L.visible_message("[src] slams into [L]!", "[src] tramples you into the ground!") diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm index 6236cb8f81ec..fdc8f6cc87a5 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm @@ -54,6 +54,8 @@ return ..() /mob/living/simple_animal/hostile/megafauna/Moved() + if(target) + DestroySurroundings() //So they can path through chasms. if(nest && nest.parent && get_dist(nest.parent, src) > nest_range) var/turf/closest = get_turf(nest.parent) for(var/i = 1 to nest_range) @@ -128,6 +130,12 @@ recovery_time = world.time + buffer_time ranged_cooldown = world.time + buffer_time +/mob/living/simple_animal/hostile/megafauna/DestroySurroundings() + . = ..() + for(var/turf/simulated/floor/chasm/C in circlerangeturfs(src, 1)) + C.density = FALSE //I hate it. + addtimer(VARSET_CALLBACK(C, density, TRUE), 2 SECONDS) // Needed to make them path. I hate it. + /datum/action/innate/megafauna_attack name = "Megafauna Attack" icon_icon = 'icons/mob/actions/actions_animal.dmi'