diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index 1d7a3b8df61..5baea0ba429 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -47,6 +47,8 @@ #define isclockmob(A) (istype(A, /mob/living/simple_animal/hostile/clockwork)) +#define ismegafauna(A) (istype(A, /mob/living/simple_animal/hostile/megafauna)) + #define isshade(A) (istype(A, /mob/living/simple_animal/shade)) #define isbear(A) (istype(A, /mob/living/simple_animal/hostile/bear)) diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm index 98579eb7473..7f4e1cb173c 100644 --- a/code/game/objects/effects/portals.dm +++ b/code/game/objects/effects/portals.dm @@ -61,7 +61,7 @@ qdel(src) return if (istype(M, /atom/movable)) - if(istype(M, /mob/living/simple_animal/hostile/megafauna)) + if(ismegafauna(M)) message_admins("[M] (FLW) has teleported through [src].") do_teleport(M, target, precision) ///You will appear adjacent to the beacon diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index c2d06ce0ad9..58e2138bcdb 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -538,7 +538,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(!target) return 0 - if(istype (target, /mob/living/simple_animal/hostile/megafauna)) + if(ismegafauna(target)) src << "This creature is too powerful for you to possess!" return 0 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 c68f310fda4..20f2980b576 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm @@ -17,6 +17,15 @@ atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) minbodytemp = 0 maxbodytemp = INFINITY + environment_target_typecache = list( + /obj/machinery/door/window, + /obj/structure/window, + /obj/structure/closet, + /obj/structure/table, + /obj/structure/grille, + /obj/structure/rack, + /obj/structure/barricade, + /obj/machinery/field) var/medal_type = MEDAL_PREFIX var/score_type = BOSS_SCORE var/elimination = 0 diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm index 4dc2e7b65d3..08611b40c63 100644 --- a/code/modules/power/singularity/containment_field.dm +++ b/code/modules/power/singularity/containment_field.dm @@ -1,7 +1,7 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 /obj/machinery/field/containment - name = "Containment Field" + name = "containment field" desc = "An energy field." icon = 'icons/obj/singularity.dmi' icon_state = "Contain_F" @@ -34,6 +34,16 @@ /obj/machinery/field/containment/ex_act(severity, target) return 0 +/obj/machinery/field/containment/attack_animal(mob/living/simple_animal/M) + if(!FG1 || !FG2) + qdel(src) + return + if(ismegafauna(M)) + M.visible_message("[M] glows fiercely as the containment field flickers out!") + FG1.calc_power(INFINITY) //rip that 'containment' field + M.adjustHealth(-M.obj_damage) + else + ..() /obj/machinery/field/containment/Crossed(mob/mover) if(isliving(mover)) diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index 865de6a98f0..18a44a73ff7 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -23,7 +23,7 @@ field_generator power level display #define FG_ONLINE 2 /obj/machinery/field/generator - name = "Field Generator" + name = "field generator" desc = "A large thermal battery that projects a high amount of energy when powered." icon = 'icons/obj/machines/field_generator.dmi' icon_state = "Field_Gen" @@ -133,6 +133,15 @@ field_generator power level display else return ..() +/obj/machinery/field/generator/attack_animal(mob/living/simple_animal/M) + if(M.environment_smash >= 3 && active == FG_OFFLINE && state != FG_UNSECURED) + state = FG_UNSECURED + anchored = FALSE + M.visible_message("[M] rips [src] free from its moorings!") + else + ..() + if(!anchored) + step(src, get_dir(M, src)) /obj/machinery/field/generator/emp_act() return 0 @@ -182,8 +191,10 @@ field_generator power level display start_fields() -/obj/machinery/field/generator/proc/calc_power() +/obj/machinery/field/generator/proc/calc_power(set_power_draw) var/power_draw = 2 + fields.len + if(set_power_draw) + power_draw = set_power_draw if(draw_power(round(power_draw/2,1))) check_power_level() diff --git a/code/modules/ruins/objects_and_mobs/ash_walker_den.dm b/code/modules/ruins/objects_and_mobs/ash_walker_den.dm index 98e67d0e62d..c110cc2a5d0 100644 --- a/code/modules/ruins/objects_and_mobs/ash_walker_den.dm +++ b/code/modules/ruins/objects_and_mobs/ash_walker_den.dm @@ -24,7 +24,7 @@ if(H.stat) visible_message("Serrated tendrils eagerly pull [H] to [src], tearing the body apart as its blood seeps over the eggs.") playsound(get_turf(src),'sound/magic/Demon_consume.ogg', 100, 1) - if(istype(H,/mob/living/simple_animal/hostile/megafauna/dragon)) + if(ismegafauna(H)) meat_counter += 20 else meat_counter ++ diff --git a/code/modules/spells/spell_types/mind_transfer.dm b/code/modules/spells/spell_types/mind_transfer.dm index 68261f3038e..b67415dcfff 100644 --- a/code/modules/spells/spell_types/mind_transfer.dm +++ b/code/modules/spells/spell_types/mind_transfer.dm @@ -35,7 +35,7 @@ Also, you never added distance checking after target is selected. I've went ahea user << "They are too far away!" return - if(istype(target, /mob/living/simple_animal/hostile/megafauna)) + if(ismegafauna(target)) user << "This creature is too powerful to control!" return