diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index 875bcc7178c..f68eb741061 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -52,26 +52,20 @@ /obj/machinery/optable/attack_paw(mob/user as mob) if ((HULK in usr.mutations)) usr << text("\blue You destroy the operating table.") - for(var/mob/O in oviewers()) - if ((O.client && !( O.blinded ))) - O << text("\red [usr] destroys the operating table.") + visible_message("\red [usr] destroys the operating table!") src.density = 0 del(src) if (!( locate(/obj/machinery/optable, user.loc) )) step(user, get_dir(user, src)) if (user.loc == src.loc) user.layer = TURF_LAYER - for(var/mob/M in viewers(user, null)) - M.show_message("The monkey hides under the table!", 1) - //Foreach goto(69) + visible_message("The monkey hides under the table!") return /obj/machinery/optable/attack_hand(mob/user as mob) if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) usr << text("\blue You destroy the table.") - for(var/mob/O in oviewers()) - if ((O.client && !( O.blinded ))) - O << text("\red [usr] destroys the table.") + visible_message("\red [usr] destroys the operating table!") src.density = 0 del(src) return @@ -118,8 +112,7 @@ M.client.eye = src M.resting = 1 M.loc = src.loc - for (var/mob/C in viewers(src)) - C.show_message("\red [M] has been laid on the operating table by [user].", 3) + visible_message("\red [M] has been laid on the operating table by [user].", 3) for(var/obj/O in src) O.loc = src.loc src.add_fingerprint(user) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 428702f45bb..f360d942fd4 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -155,6 +155,13 @@ return +/obj/structure/closet/attack_animal(mob/living/simple_animal/user as mob) + if(user.wall_smash) + visible_message("\red [user] destroys the [src]. ") + for(var/atom/movable/A as mob|obj in src) + A.loc = src.loc + del(src) + // this should probably use dump_contents() /obj/structure/closet/blob_act() if(prob(75)) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 48fc036f0d5..97b708a458d 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -243,9 +243,7 @@ /obj/structure/table/attack_paw(mob/user as mob) if ((HULK in usr.mutations)) usr << "\blue You destroy the table." - for(var/mob/O in oviewers()) - if ((O.client && !( O.blinded ))) - O << "\red [user] smashes the table apart!" + visible_message("\red [user] smashes the table apart!") if(istype(src, /obj/structure/table/reinforced)) new /obj/item/weapon/table_parts/reinforced( src.loc ) else if(istype(src, /obj/structure/table/woodentable)) @@ -258,18 +256,14 @@ step(user, get_dir(user, src)) if (user.loc == src.loc) user.layer = TURF_LAYER - for(var/mob/O in oviewers()) - if ((O.client && !( O.blinded ))) - O << "[user] hides under the table!" + visible_message("[user] hides under the table!") //Foreach goto(69) return /obj/structure/table/attack_alien(mob/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N usr << "\green You destroy the table." - for(var/mob/O in oviewers()) - if ((O.client && !( O.blinded ))) - O << "\red [user] slices the table apart!" + visible_message("\red [user] slices the table apart!") if(istype(src, /obj/structure/table/reinforced)) new /obj/item/weapon/table_parts/reinforced( src.loc ) else if(istype(src, /obj/structure/table/woodentable)) @@ -281,12 +275,10 @@ return -/obj/structure/table/attack_animal(mob/living/simple_animal/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N +/obj/structure/table/attack_animal(mob/living/simple_animal/user as mob) if(user.wall_smash) usr << "\red You destroy the table." - for(var/mob/O in oviewers()) - if ((O.client && !( O.blinded ))) - O << "\red [user] smashes the table apart!" + visible_message("\red [user] smahes the table apart!") if(istype(src, /obj/structure/table/reinforced)) new /obj/item/weapon/table_parts/reinforced( src.loc ) else if(istype(src, /obj/structure/table/woodentable)) @@ -303,9 +295,7 @@ /obj/structure/table/attack_hand(mob/user as mob) if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) usr << "\blue You destroy the table." - for(var/mob/O in oviewers()) - if ((O.client && !( O.blinded ))) - O << "\red [user] smashes the table apart!" + visible_message("\red [user] smahes the table apart!") if(istype(src, /obj/structure/table/reinforced)) new /obj/item/weapon/table_parts/reinforced( src.loc ) else if(istype(src, /obj/structure/table/woodentable)) @@ -346,9 +336,7 @@ return G.affecting.loc = src.loc G.affecting.Weaken(5) - for(var/mob/O in viewers(world.view, src)) - if (O.client) - O << "\red [G.assailant] puts [G.affecting] on the table." + visible_message("\red [G.assailant] puts [G.affecting] on the table.") del(W) return @@ -400,9 +388,7 @@ return G.affecting.loc = src.loc G.affecting.Weaken(5) - for(var/mob/O in viewers(world.view, src)) - if (O.client) - O << "\red [G.assailant] puts [G.affecting] on the wooden table." + visible_message("\red [G.assailant] puts [G.affecting] on the table.") del(W) return if (istype(W, /obj/item/weapon/wrench)) @@ -451,9 +437,7 @@ return G.affecting.loc = src.loc G.affecting.Weaken(5) - for(var/mob/O in viewers(world.view, src)) - if (O.client) - O << "\red [G.assailant] puts [G.affecting] on the reinforced table." + visible_message("\red [G.assailant] puts [G.affecting] on the table.") del(W) return diff --git a/code/modules/mob/living/simple_animal/syndicate.dm b/code/modules/mob/living/simple_animal/syndicate.dm index 60fd897839f..93dd0b462bd 100644 --- a/code/modules/mob/living/simple_animal/syndicate.dm +++ b/code/modules/mob/living/simple_animal/syndicate.dm @@ -38,6 +38,7 @@ min_n2 = 0 max_n2 = 0 unsuitable_atoms_damage = 15 + wall_smash = 1 var/stance = SYNDICATE_STANCE_IDLE //Used to determine behavior var/mob/living/target_mob @@ -53,6 +54,10 @@ del src return + for(dir in list(NORTH,EAST,SOUTH,WEST)) + var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir)) + if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille)) + obstacle.attack_animal(src) if(health < 1) Die()